Class: Cabot::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/cabot/factory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#modelObject

Returns the value of attribute model.



3
4
5
# File 'lib/cabot/factory.rb', line 3

def model
  @model
end

#resultObject

Returns the value of attribute result.



3
4
5
# File 'lib/cabot/factory.rb', line 3

def result
  @result
end

#serializerObject

Returns the value of attribute serializer.



3
4
5
# File 'lib/cabot/factory.rb', line 3

def serializer
  @serializer
end