Method: JMESPath::Nodes::Field#initialize

Defined in:
lib/jmespath/nodes/field.rb

#initialize(key) ⇒ Field

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 Field.



5
6
7
8
9
# File 'lib/jmespath/nodes/field.rb', line 5

def initialize(key)
  @key = key
  @keys = [key]
  @key_sym = key.respond_to?(:to_sym) ? key.to_sym : nil
end