Module: DynamoidAdvancedWhere::Nodes::Concerns::SupportsGreaterThan

Included in:
NumberAttributeNode, NumericDateAttributeNode, NumericDatetimeAttributeNode
Defined in:
lib/dynamoid_advanced_where/nodes/less_than_node.rb,
lib/dynamoid_advanced_where/nodes/greater_than_node.rb

Instance Method Summary collapse

Instance Method Details

#gt(other_value) ⇒ Object Also known as: >



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/dynamoid_advanced_where/nodes/greater_than_node.rb', line 11

def gt(other_value)
  val = if respond_to?(:parse_right_hand_side)
          parse_right_hand_side(other_value)
        else
          other_value
        end

  GreaterThanNode.new(
    lh_operation: self,
    rh_operation: LiteralNode.new(val)
  )
end

#lt(other_value) ⇒ Object Also known as: <



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/dynamoid_advanced_where/nodes/less_than_node.rb', line 11

def lt(other_value)
  val = if respond_to?(:parse_right_hand_side)
          parse_right_hand_side(other_value)
        else
          other_value
        end

  LessThanNode.new(
    lh_operation: self,
    rh_operation: LiteralNode.new(val)
  )
end