Class: ParamsReady::Query::VariableOperatorPredicateBuilder

Inherits:
AbstractPredicateBuilder show all
Includes:
HavingAttribute, HavingType
Defined in:
lib/params_ready/query/variable_operator_predicate.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Extensions::Registry

#human_string, #registry

Methods inherited from AbstractBuilder

#build, builder, define_parameter, define_registered_parameter, #fetch, fetch_builder, #include, #initialize, #open?, register, register_deprecated, resolve

Constructor Details

This class inherits a constructor from ParamsReady::AbstractBuilder

Class Method Details

.instance(name, altn: nil, attr: nil) ⇒ Object



69
70
71
# File 'lib/params_ready/query/variable_operator_predicate.rb', line 69

def self.instance(name, altn: nil, attr: nil)
  new VariableOperatorPredicateDefinition.new name, altn: altn, attribute_name: attr
end

Instance Method Details

#data_object_handlesObject



73
74
75
# File 'lib/params_ready/query/variable_operator_predicate.rb', line 73

def data_object_handles
  [:value, :val]
end

#operators(*arr, &block) ⇒ Object



77
78
79
# File 'lib/params_ready/query/variable_operator_predicate.rb', line 77

def operators(*arr, &block)
  @definition.set_operators(arr, &block)
end