https://github.com/shuber/respond_to_missing
Defines Object#respond_to_missing? and patches Object#respond_to?
https://github.com/shuber/respond_to_missing
Last synced: 4 months ago
JSON representation
Defines Object#respond_to_missing? and patches Object#respond_to?
- Host: GitHub
- URL: https://github.com/shuber/respond_to_missing
- Owner: shuber
- License: mit
- Created: 2011-04-01T18:47:00.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2013-01-31T18:13:58.000Z (over 13 years ago)
- Last Synced: 2025-12-12T18:02:34.193Z (6 months ago)
- Language: Ruby
- Homepage:
- Size: 133 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: MIT-LICENSE
Awesome Lists containing this project
README
= respond_to_missing
{
}[http://travis-ci.org/shuber/respond_to_missing]
{
}[http://rubygems.org/gems/respond_to_missing]
{
}[https://codeclimate.com/github/shuber/respond_to_missing]
{
}[http://githalytics.com/shuber/respond_to_missing]
Defines {Object#respond_to_missing?}[http://www.ruby-doc.org/core/classes/Object.html#M001006] and patches {Object#respond_to?}[http://www.ruby-doc.org/core/classes/Object.html#M001005] unless this functionality has already been implemented (ruby versions 1.9+)
== Installation
gem install respond_to_missing
== Usage
Define respond_to_missing? whenever an object overrides method_missing
class User
def method_missing(method_name, *args)
method_name == :test_method ? true : super
end
def respond_to_missing?(method_name, include_super)
method_name == :test_method || super
end
end
== Testing
rake