Class: JMESPath::Nodes::ArrayProjection Private

Inherits:
Projection show all
Defined in:
lib/jmespath/nodes/projection.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

FastArrayProjection

Instance Method Summary collapse

Methods inherited from Projection

#initialize, #optimize, #visit

Methods inherited from Node

#chains_with?, #optimize, #visit

Constructor Details

This class inherits a constructor from JMESPath::Nodes::Projection

Instance Method Details

#extract_targets(target) ⇒ 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.



46
47
48
# File 'lib/jmespath/nodes/projection.rb', line 46

def extract_targets(target)
  target.to_ary if target.respond_to?(:to_ary)
end

#fast_instanceObject

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.



50
51
52
# File 'lib/jmespath/nodes/projection.rb', line 50

def fast_instance
  FastArrayProjection.new(@target.optimize, @projection.optimize)
end