Class: JMESPath::Nodes::LiteralRightNeqCondition Private

Inherits:
NeqCondition show all
Defined in:
lib/jmespath/nodes/condition.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary

Constants inherited from ComparatorCondition

ComparatorCondition::COMPARABLE_TYPES, ComparatorCondition::COMPARATOR_TO_CONDITION

Instance Method Summary collapse

Methods inherited from NeqCondition

#optimize

Methods inherited from Node

#chains_with?, #optimize

Constructor Details

#initialize(left, right, child) ⇒ LiteralRightNeqCondition

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of LiteralRightNeqCondition.



96
97
98
99
# File 'lib/jmespath/nodes/condition.rb', line 96

def initialize(left, right, child)
  super
  @right = @right.value
end

Instance Method Details

#visit(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



101
102
103
# File 'lib/jmespath/nodes/condition.rb', line 101

def visit(value)
  Util.as_json(@left.visit(value)) != @right ? @child.visit(value) : nil
end