Class: ParamsReady::Query::FixedOperatorPredicateBuilder

Inherits:
AbstractPredicateBuilder show all
Includes:
HavingAttribute, HavingType, HavingValue
Defined in:
lib/params_ready/query/fixed_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



39
40
41
# File 'lib/params_ready/query/fixed_operator_predicate.rb', line 39

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

Instance Method Details

#data_object_handlesObject



43
44
45
# File 'lib/params_ready/query/fixed_operator_predicate.rb', line 43

def data_object_handles
  [@definition.name, @definition.altn]
end

#operator(name) ⇒ Object



47
48
49
50
# File 'lib/params_ready/query/fixed_operator_predicate.rb', line 47

def operator(name)
  operator = PredicateRegistry.operator name, Format.instance(:backend)
  @definition.set_operator operator
end