class Gizmo::Delete
Public Instance Methods
call(criteria, id)
click to toggle source
Delete
a single item using the provided criteria.
@param [Mongoid::Criteria] criteria the criteria to use for deleting a single item @param [String, Moped::BSON::ObjectId] id the ID of the item being deleted
@return [Gizmo::Response]
# File lib/gizmo/delete.rb, line 10 def call(criteria, id) response = create_response criteria.find(id).delete response.data = {} response end