make a little more real

This commit is contained in:
Torsten Ruger 2014-09-16 16:05:38 +03:00
parent dd8e46fd1c
commit bbcfef3c43

View File

@ -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