Class: Gizmo::Delete
- Inherits:
-
BaseOperation
- Object
- BaseOperation
- Gizmo::Delete
- Defined in:
- lib/gizmo/delete.rb
Instance Attribute Summary
Attributes inherited from BaseOperation
Instance Method Summary collapse
-
#call(criteria, id) ⇒ Gizmo::Response
Delete a single item using the provided criteria.
Methods inherited from BaseOperation
#create_response, #default_status, #initialize, #set_response_headers
Constructor Details
This class inherits a constructor from Gizmo::BaseOperation
Instance Method Details
#call(criteria, id) ⇒ Gizmo::Response
Delete a single item using the provided criteria.
10 11 12 13 14 15 |
# File 'lib/gizmo/delete.rb', line 10 def call(criteria, id) response = create_response criteria.find(id).delete response.data = {} response end |