From bbcfef3c4319af9d4d73c3a236c1ba00ed2b17a6 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Tue, 16 Sep 2014 16:05:38 +0300 Subject: [PATCH] make a little more real --- lib/parfait/hash.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/parfait/hash.rb b/lib/parfait/hash.rb index 884c9293..8dd3d74a 100644 --- a/lib/parfait/hash.rb +++ b/lib/parfait/hash.rb @@ -6,6 +6,12 @@ class Parfait::Hash @keys = Array.new() @values = Array.new() end + def values() + @values + end + def keys() + @keys + end def empty? @keys.empty? end @@ -22,6 +28,9 @@ class Parfait::Hash nil end end + def [](key) + get(key) + end def key_index(key) len = @keys.length() @@ -47,5 +56,8 @@ class Parfait::Hash end value end + def []=(key,val) + set(key,val) + end end