class Castle::Commands::Lists::Query
Builds the command to query lists
Public Class Methods
build(options = {})
click to toggle source
@param options [Hash] @return [Castle::Command]
# File lib/castle/commands/lists/query.rb, line 11 def build(options = {}) options[:filters]&.each { |f| Castle::Validators::Present.call(f, %i[field op value]) } Castle::Validators::Present.call(options[:sort], %i[field order]) if options[:sort] Castle::Command.new('lists/query', options, :post) end