Class: Ekylibre::Support::Tree

Inherits:
HashWithIndifferentAccess
  • Object
show all
Defined in:
lib/ekylibre/support/tree.rb

Instance Method Summary collapse

Instance Method Details

#[](*keys) ⇒ Object


4
5
6
7
8
9
# File 'lib/ekylibre/support/tree.rb', line 4

def [](*keys)
  key = keys.shift
  object = fetch(key)
  return (object.is_a?(Tree) ? object[*keys] : nil) if keys.any?
  object
end

#[]=(*_args) ⇒ Object


11
# File 'lib/ekylibre/support/tree.rb', line 11

def []=(*_args); end