Skip to content

Instantly share code, notes, and snippets.

@aitor
Created August 29, 2008 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aitor/8002 to your computer and use it in GitHub Desktop.
Save aitor/8002 to your computer and use it in GitHub Desktop.
require 'net/http'
class Object
def method_missing(methId)
suggestion = Net::HTTP.get('search.yahooapis.com', "/WebSearchService/V1/spellingSuggestion?appid=YahooDemo&query=#{methId.to_s}")
method = /<Result>(.*)<\/Result>/.match(suggestion)
if method
puts "#{method[1]} bloody bastard, is ****#{method[1].upcase}****, not #{methId}... read the fucking docs!!!"
self.send method[1]
else
puts "what the hell '#{methId}' is bloody bastard?... read the fucking docs!!!"
super
end
end
end
puts [:endless_love].inspectt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment