Class: Gearhead::Serializers::Lookup
- Inherits:
-
Object
- Object
- Gearhead::Serializers::Lookup
- Defined in:
- lib/gearhead/serializers/lookup.rb
Instance Attribute Summary collapse
-
#adapter_name ⇒ Object
readonly
Returns the value of attribute adapter_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type, adapter_name) ⇒ Lookup
constructor
A new instance of Lookup.
- #serializer ⇒ Object
Constructor Details
#initialize(type, adapter_name) ⇒ Lookup
Returns a new instance of Lookup.
9 10 11 12 |
# File 'lib/gearhead/serializers/lookup.rb', line 9 def initialize(type, adapter_name) @type = type.to_s @adapter_name = adapter_name end |
Instance Attribute Details
#adapter_name ⇒ Object (readonly)
Returns the value of attribute adapter_name.
8 9 10 |
# File 'lib/gearhead/serializers/lookup.rb', line 8 def adapter_name @adapter_name end |
Class Method Details
Instance Method Details
#serializer ⇒ Object
14 15 16 |
# File 'lib/gearhead/serializers/lookup.rb', line 14 def serializer "::Gearhead::Serializers::#{adapter}::#{@type.classify}Serializer".constantize end |