Method: JMESPath::Nodes::Index#visit

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

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



9
10
11
12
13
14
15
# File 'lib/jmespath/nodes/index.rb', line 9

def visit(value)
  if value.is_a?(Array)
    value[@key]
  else
    nil
  end
end