Module: DynamoidAdvancedWhere::Nodes::Concerns::SupportsEquality
- Included in:
- FieldNode
- Defined in:
- lib/dynamoid_advanced_where/nodes/equality_node.rb
Instance Method Summary collapse
- #eq(other_value) ⇒ Object (also: #==)
- #not_eq(other_value) ⇒ Object (also: #!=)
Instance Method Details
#eq(other_value) ⇒ Object Also known as: ==
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/dynamoid_advanced_where/nodes/equality_node.rb', line 16 def eq(other_value) val = if respond_to?(:parse_right_hand_side) parse_right_hand_side(other_value) else other_value end EqualityNode.new( lh_operation: self, rh_operation: LiteralNode.new(val) ) end |
#not_eq(other_value) ⇒ Object Also known as: !=
30 31 32 |
# File 'lib/dynamoid_advanced_where/nodes/equality_node.rb', line 30 def not_eq(other_value) eq(other_value).negate end |