Class: Castle::Commands::Events::Group
- Inherits:
-
Object
- Object
- Castle::Commands::Events::Group
- Defined in:
- lib/castle/commands/events/group.rb
Overview
Builds the command to query aggregated events
Class Method Summary collapse
Class Method Details
.build(options = {}) ⇒ Castle::Command
11 12 13 14 15 16 |
# File 'lib/castle/commands/events/group.rb', line 11 def build( = {}) [:filters]&.each { |f| Castle::Validators::Present.call(f, %i[field op value]) } Castle::Validators::Present.call([:sort], %i[field order]) if [:sort] Castle::Command.new('events/group', , :post) end |