Created
August 29, 2008 16:45
-
-
Save aitor/8002 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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