lib/rambling/trie/children_hash_deferer.rb in rambling-trie-0.5.0 vs lib/rambling/trie/children_hash_deferer.rb in rambling-trie-0.5.1
- old
+ new
@@ -4,32 +4,32 @@
module ChildrenHashDeferer
# Proxies to @children[key]
# @param [Symbol] key the key to look for in the children's hash.
# @return [Node, nil] the child node with that key or nil.
def [](key)
- @children[key]
+ children[key]
end
# Proxies to @children[key] = value.
# @param [Symbol] key the to add or change the value for.
# @param [Node] value the node to add to the children's hash.
# @return [Node, nil] the child node with that key or nil.
def []=(key, value)
- @children[key] = value
+ children[key] = value
end
# Proxies to @children.delete(key)
# @param [Symbol] key the key to delete in the children's hash.
# @return [Node, nil] the child node corresponding to the key just deleted or nil.
def delete(key)
- @children.delete(key)
+ children.delete(key)
end
# Proxies to @children.has_key?(key)
# @param [Symbol] key the key to look for in the children's hash.
# @return [Boolean] `true` for the keys that exist in the children's hash, false otherwise.
def has_key?(key)
- @children.has_key?(key)
+ children.has_key?(key)
end
end
end
end