Class: Vayacondios::Server::EventsHandler
- Inherits:
-
DocumentHandler
- Object
- DocumentHandler
- Vayacondios::Server::EventsHandler
- Defined in:
- lib/vayacondios/server/handlers/events_handler.rb
Overview
Handles requests against multiple Events.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from DocumentHandler
Instance Method Summary collapse
-
#base_retrieve(params, query) ⇒ Object
FIXME Abstract this into method delegation.
- #delete(params, query) ⇒ Object
-
#search(params, query) ⇒ Object
(also: #retrieve)
Search for events matching a given query.
Methods inherited from DocumentHandler
#action_successful, #base_create, #base_delete, #base_search, #base_update, #call, #initialize
Constructor Details
This class inherits a constructor from Vayacondios::Server::DocumentHandler
Instance Method Details
#base_retrieve(params, query) ⇒ Object
FIXME Abstract this into method delegation
18 19 20 |
# File 'lib/vayacondios/server/handlers/events_handler.rb', line 18 def base_retrieve(params, query) base_search(params, query) end |
#delete(params, query) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/vayacondios/server/handlers/events_handler.rb', line 23 def delete(params, query) Event.destroy(params, query) do |request, opts| database.call(:remove, request, opts) end action_successful end |
#search(params, query) ⇒ Object Also known as: retrieve
Search for events matching a given query.
10 11 12 13 14 |
# File 'lib/vayacondios/server/handlers/events_handler.rb', line 10 def search(params, query) Event.search(params, query) do |request, filter, opts| database.call(:search, request, filter, opts) end end |