Class: Ookkee::Factory

Inherits:
BasicObject
Defined in:
lib/ookkee/factory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFactory

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

#attributesObject (readonly)

Returns the value of attribute attributes.



7
8
9
# File 'lib/ookkee/factory.rb', line 7

def attributes
  @attributes
end