module Configue::HashNode
Public Instance Methods
[](key)
click to toggle source
# File lib/configue/hash_node.rb, line 5 def [](key) k = key.to_s v = @container[k] @container[k] = self.class.new(v) if node?(v) @container[k] end
assoc(key)
click to toggle source
# File lib/configue/hash_node.rb, line 27 def assoc(key) k = key.to_s @container.assoc(k) end
fetch(key)
click to toggle source
# File lib/configue/hash_node.rb, line 12 def fetch(key) k = key.to_s v = @container[key] @container[k] = self.class.new(v) if node?(v) @container.fetch(k) end
key?(key)
click to toggle source
# File lib/configue/hash_node.rb, line 19 def key?(key) k = key.to_s @container.key?(k) end
to_hash()
click to toggle source
# File lib/configue/hash_node.rb, line 32 def to_hash @container.dup end
values_at(*keys)
click to toggle source
# File lib/configue/hash_node.rb, line 36 def values_at(*keys) ks = keys.map {|k| k.to_s } @container.values_at(*ks) end