Class: Castle::Commands::Lists::Query
- Inherits:
-
Object
- Object
- Castle::Commands::Lists::Query
- Defined in:
- lib/castle/commands/lists/query.rb
Overview
Builds the command to query lists
Class Method Summary collapse
Class Method Details
.build(options = {}) ⇒ Castle::Command
11 12 13 14 15 16 |
# File 'lib/castle/commands/lists/query.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('lists/query', , :post) end |