Skip to content

Instantly share code, notes, and snippets.

@bronson
Created February 14, 2010 18:10
Show Gist options
  • Save bronson/304161 to your computer and use it in GitHub Desktop.
Save bronson/304161 to your computer and use it in GitHub Desktop.
module RestClient
# Compatibility : make the Response act like a Net::HTTPResponse when needed
module ResponseForException
def method_missing symbol, *args
puts "called: #{:symbol}"
end
end
end
# produces: undefined method `whatev' for RestClient::ResponseForException:Module (NoMethodError)
RestClient::ResponseForException.whatev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment