Class: Ookkee::Factory
- Inherits:
- BasicObject
- Defined in:
- lib/ookkee/factory.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize ⇒ Factory
constructor
A new instance of Factory.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize ⇒ Factory
Returns a new instance of Factory.
3 4 5 |
# File 'lib/ookkee/factory.rb', line 3 def initialize @attributes = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
9 10 11 |
# File 'lib/ookkee/factory.rb', line 9 def method_missing(name, *args, &block) @attributes[name] = args[0] end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
7 8 9 |
# File 'lib/ookkee/factory.rb', line 7 def attributes @attributes end |