Class: Definition::Enroller
- Inherits:
-
Object
- Object
- Definition::Enroller
- Defined in:
- lib/definition.rb
Instance Method Summary collapse
-
#initialize(defn, table) ⇒ Enroller
constructor
A new instance of Enroller.
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize(defn, table) ⇒ Enroller
Returns a new instance of Enroller.
19 20 21 22 |
# File 'lib/definition.rb', line 19 def initialize(defn, table) @defn = defn @table = table end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
23 24 25 26 27 |
# File 'lib/definition.rb', line 23 def method_missing(name, *args) @defn.set(args) @table[name] ||= [] @table[name] << @defn end |