Module: HashAtPath::CoreExt::Hash::AtPath

Defined in:
lib/hash_at_path/core_ext/hash/at_path.rb

Instance Method Summary collapse

Instance Method Details

#at_path(path) ⇒ Object

Returns a value at the end of an xpath-like/lite path



6
7
8
9
10
11
12
# File 'lib/hash_at_path/core_ext/hash/at_path.rb', line 6

def at_path(path)
  if path == '/'
      self
  else
    extract(self, path)
  end
end