Class: Catchy::MethodChain

Inherits:
Object
  • Object
show all
Defined in:
lib/catchy/method_chain.rb

Instance Method Summary collapse

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( options = {} )
  configure( options )
  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