Class: JMESPath::Nodes::NeqCondition Private
- Inherits:
-
ComparatorCondition
- Object
- Node
- ComparatorCondition
- JMESPath::Nodes::NeqCondition
- 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.
Direct Known Subclasses
Constant Summary
Constants inherited from ComparatorCondition
ComparatorCondition::COMPARABLE_TYPES, ComparatorCondition::COMPARATOR_TO_CONDITION
Instance Method Summary collapse
- #optimize ⇒ Object private
- #visit(value) ⇒ Object private
Methods inherited from ComparatorCondition
Methods inherited from Node
Constructor Details
This class inherits a constructor from JMESPath::Nodes::ComparatorCondition
Instance Method Details
#optimize ⇒ 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.
86 87 88 89 90 91 92 |
# File 'lib/jmespath/nodes/condition.rb', line 86 def optimize if @right.is_a?(Literal) LiteralRightNeqCondition.new(@left, @right, @child) else self end end |
#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.
82 83 84 |
# File 'lib/jmespath/nodes/condition.rb', line 82 def visit(value) Util.as_json(@left.visit(value)) != Util.as_json(@right.visit(value)) ? @child.visit(value) : nil end |