make a little more real
This commit is contained in:
parent
dd8e46fd1c
commit
bbcfef3c43
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user