Class: Tanka::Factory
- Inherits:
-
Object
- Object
- Tanka::Factory
- Defined in:
- lib/tanka/factory.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(name) ⇒ Factory
constructor
A new instance of Factory.
Constructor Details
#initialize(name) ⇒ Factory
Returns a new instance of Factory.
10 11 12 |
# File 'lib/tanka/factory.rb', line 10 def initialize(name) @name = name.to_s end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/tanka/factory.rb', line 8 def name @name end |
Instance Method Details
#build ⇒ Object
14 15 16 |
# File 'lib/tanka/factory.rb', line 14 def build factory_name.new(generate) end |