Class: It
- Inherits:
- BasicObject
- Defined in:
- lib/slab/methodphitamine.rb
Instance Method Summary collapse
-
#initialize ⇒ It
constructor
A new instance of It.
- #method_missing(*args, &block) ⇒ Object
- #to_proc ⇒ Object
Constructor Details
#initialize ⇒ It
Returns a new instance of It.
11 12 13 |
# File 'lib/slab/methodphitamine.rb', line 11 def initialize @methods = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
15 16 17 18 |
# File 'lib/slab/methodphitamine.rb', line 15 def method_missing(*args, &block) @methods << [args, block] unless args == [:respond_to?, :to_proc] self end |