Class: Cabot::Factory
- Inherits:
-
Object
- Object
- Cabot::Factory
- Defined in:
- lib/cabot/factory.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
Returns the value of attribute model.
-
#result ⇒ Object
Returns the value of attribute result.
-
#serializer ⇒ Object
Returns the value of attribute serializer.
Instance Method Summary collapse
-
#initialize(result) ⇒ Factory
constructor
A new instance of Factory.
Constructor Details
#initialize(result) ⇒ Factory
Returns a new instance of Factory.
5 6 7 8 9 |
# File 'lib/cabot/factory.rb', line 5 def initialize(result) @result = result @model = result[Cabot.configuration.symbolize_keys ? :model : "model"] @serializer = result[Cabot.configuration.symbolize_keys ? :serializer : "serializer"] end |
Instance Attribute Details
#model ⇒ Object
Returns the value of attribute model.
3 4 5 |
# File 'lib/cabot/factory.rb', line 3 def model @model end |
#result ⇒ Object
Returns the value of attribute result.
3 4 5 |
# File 'lib/cabot/factory.rb', line 3 def result @result end |
#serializer ⇒ Object
Returns the value of attribute serializer.
3 4 5 |
# File 'lib/cabot/factory.rb', line 3 def serializer @serializer end |