Class: JMESPath::Nodes::ObjectProjection 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

FastObjectProjection

Instance Method Summary collapse

Methods inherited from Projection

#initialize, #optimize, #visit

Methods inherited from Node

#chains_with?, #hash_like?, #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.



65
66
67
68
69
70
71
# File 'lib/jmespath/nodes/projection.rb', line 65

def extract_targets(target)
  if hash_like?(target)
    target.values
  else
    nil
  end
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.



73
74
75
# File 'lib/jmespath/nodes/projection.rb', line 73

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