Class: AgnosticBackend::Queryable::Criteria::Ternary

Inherits:
Criterion show all
Defined in:
lib/agnostic_backend/queryable/criteria/ternary.rb

Direct Known Subclasses

Between

Instance Attribute Summary collapse

Attributes inherited from TreeNode

#children, #context

Instance Method Summary collapse

Methods inherited from TreeNode

#==, #accept

Methods included from Utilities

included

Constructor Details

#initialize(attribute:, left_value:, right_value:, context: nil) ⇒ Ternary

Returns a new instance of Ternary.



7
8
9
10
# File 'lib/agnostic_backend/queryable/criteria/ternary.rb', line 7

def initialize(attribute:, left_value:, right_value:, context: nil)
  @attribute, @left_value, @right_value = attribute, left_value, right_value
  super([attribute, left_value, right_value], context)
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



5
6
7
# File 'lib/agnostic_backend/queryable/criteria/ternary.rb', line 5

def attribute
  @attribute
end

#left_valueObject (readonly)

Returns the value of attribute left_value.



5
6
7
# File 'lib/agnostic_backend/queryable/criteria/ternary.rb', line 5

def left_value
  @left_value
end

#right_valueObject (readonly)

Returns the value of attribute right_value.



5
6
7
# File 'lib/agnostic_backend/queryable/criteria/ternary.rb', line 5

def right_value
  @right_value
end