Class: Catchy::MethodChain
- Inherits:
-
Object
- Object
- Catchy::MethodChain
- Defined in:
- lib/catchy/method_chain.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ MethodChain
constructor
A new instance of MethodChain.
- #method_missing(name) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ MethodChain
Returns a new instance of MethodChain.
3 4 5 6 7 |
# File 'lib/catchy/method_chain.rb', line 3 def initialize( = {} ) configure( ) define_methods @method_chain = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
9 10 11 12 |
# File 'lib/catchy/method_chain.rb', line 9 def method_missing(name) @method_chain << name return self end |