class ParamsReady::Query::ArrayGroupingBuilder

Public Class Methods

instance(name, altn: nil) click to toggle source
# File lib/params_ready/query/array_grouping.rb, line 41
def self.instance(name, altn: nil)
  new ArrayGroupingDefinition.new(name, altn: altn)
end

Public Instance Methods

operator(&block) click to toggle source
# File lib/params_ready/query/array_grouping.rb, line 45
def operator(&block)
  definition = Builder.define_grouping_operator(:operator, altn: :op, &block)
  add definition
end
prototype(type_name, name = :proto, *arr, **opts, &block) click to toggle source
# File lib/params_ready/query/array_grouping.rb, line 35
def prototype(type_name, name = :proto, *arr, **opts, &block)
  prototype = PredicateRegistry.predicate(type_name).instance(name, *arr, **opts)
  prototype.instance_eval(&block) unless block.nil?
  @definition.set_prototype prototype.build
end