class ParamsReady::Query::FixedOperatorPredicate
Public Class Methods
new(definition, **options)
click to toggle source
Calls superclass method
ParamsReady::Parameter::AbstractParameter::new
# File lib/params_ready/query/fixed_operator_predicate.rb, line 14 def initialize(definition, **options) super definition @data = definition.type.create end
Public Instance Methods
build_query(select_expression, context: nil)
click to toggle source
# File lib/params_ready/query/fixed_operator_predicate.rb, line 19 def build_query(select_expression, context: nil) definition.operator.to_query(select_expression, @data.unwrap) end
inspect_content()
click to toggle source
# File lib/params_ready/query/fixed_operator_predicate.rb, line 27 def inspect_content op = definition.operator.name "#{definition.attribute_name} #{op} #{@data.inspect}" end
perform_test(record, attribute_name)
click to toggle source
# File lib/params_ready/query/fixed_operator_predicate.rb, line 23 def perform_test(record, attribute_name) definition.operator.test(record, attribute_name, @data.unwrap) end