Class: Mara::Persistence::DestroyRequest
- Inherits:
-
Struct
- Object
- Struct
- Mara::Persistence::DestroyRequest
- Defined in:
- lib/mara/persistence.rb
Overview
A wrapper for a destroy request.
Instance Attribute Summary collapse
-
#record ⇒ Hash
The record hash to be destroyed.
Instance Method Summary collapse
-
#as_json ⇒ Hash
Converts the DestroyRequest to JSON.
Instance Attribute Details
#record ⇒ Hash
The record hash to be destroyed.
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/mara/persistence.rb', line 56 DestroyRequest = Struct.new(:record) do ## # Converts the DestroyRequest to JSON # # @return [Hash] def as_json { delete_request: { key: record } } end end |
Instance Method Details
#as_json ⇒ Hash
Converts the DestroyRequest to JSON
61 62 63 64 65 66 67 |
# File 'lib/mara/persistence.rb', line 61 def as_json { delete_request: { key: record } } end |