Class: ApiMapper::Serializer
- Inherits:
-
Object
- Object
- ApiMapper::Serializer
- Defined in:
- lib/api_mapper/client.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(model) ⇒ Serializer
constructor
A new instance of Serializer.
Constructor Details
#initialize(model) ⇒ Serializer
Returns a new instance of Serializer.
124 125 126 |
# File 'lib/api_mapper/client.rb', line 124 def initialize(model) @model = model end |
Instance Method Details
#call ⇒ Object
128 129 130 |
# File 'lib/api_mapper/client.rb', line 128 def call serialize.to_json if @model end |