diff --git a/lib/polecat/storage/binary_storage.rb b/lib/polecat/storage/binary_storage.rb index aaa8446..5109328 100644 --- a/lib/polecat/storage/binary_storage.rb +++ b/lib/polecat/storage/binary_storage.rb @@ -36,6 +36,7 @@ module Polecat end # end of while end end + alias :[]= :add def delete key check_key key @@ -96,6 +97,7 @@ module Polecat end nil end + alias :[] :find def select node = @root, &block if node.nil? diff --git a/lib/polecat/storage/hash_storage.rb b/lib/polecat/storage/hash_storage.rb index 4f1e433..305de72 100644 --- a/lib/polecat/storage/hash_storage.rb +++ b/lib/polecat/storage/hash_storage.rb @@ -10,6 +10,7 @@ module Polecat check_key key @storage[key] = value end + alias :[]= :add def delete key check_key key @@ -32,6 +33,7 @@ module Polecat nil end end + alias :[] :find def select &block out = []