Class: Vayacondios::Server::StashesHandler
- Inherits:
-
DocumentHandler
- Object
- DocumentHandler
- Vayacondios::Server::StashesHandler
- Defined in:
- lib/vayacondios/server/handlers/stashes_handler.rb
Instance Attribute Summary
Attributes inherited from DocumentHandler
Instance Method Summary collapse
-
#delete(params, query) ⇒ Object
Delete many stashes that match a query.
-
#retrieve(params, query) ⇒ Object
Search for stashes matching a given query.
Methods inherited from DocumentHandler
#action_successful, #base_create, #base_delete, #base_retrieve, #base_search, #base_update, #call, #initialize
Constructor Details
This class inherits a constructor from Vayacondios::Server::DocumentHandler
Instance Method Details
#delete(params, query) ⇒ Object
Delete many stashes that match a query.
40 41 42 43 44 45 46 |
# File 'lib/vayacondios/server/handlers/stashes_handler.rb', line 40 def delete(params, query) raise Goliath::Validation::BadRequestError.new 'Query cannot be empty' if query.empty? Stash.destroy(params, query) do |request, filter| database.call(:remove, request, filter) end action_successful end |