Class: Flatpack::Client::FlatpackRequest
- Defined in:
- lib/flatpack/client/flatpack_request.rb
Instance Attribute Summary collapse
-
#entity ⇒ Object
Returns the value of attribute entity.
Instance Method Summary collapse
Methods inherited from Request
#execute, #header, #initialize, #query_parameter
Constructor Details
This class inherits a constructor from Flatpack::Client::Request
Instance Attribute Details
#entity ⇒ Object
Returns the value of attribute entity.
5 6 7 |
# File 'lib/flatpack/client/flatpack_request.rb', line 5 def entity @entity end |
Instance Method Details
#payload ⇒ Object
11 12 13 |
# File 'lib/flatpack/client/flatpack_request.rb', line 11 def payload @api.flatpack.packer.pack(@entity) end |
#process_response(response) ⇒ Object
7 8 9 |
# File 'lib/flatpack/client/flatpack_request.rb', line 7 def process_response(response) @api.flatpack.unpacker.unpack(parse_json(response)) end |