get sod to output lists and dicts

This commit is contained in:
Torsten Ruger
2015-05-20 10:57:20 +03:00
parent 6f46f54714
commit 06cfba7c58
3 changed files with 31 additions and 7 deletions

View File

@ -60,6 +60,17 @@ module Parfait
set(key,val)
end
def each
index = 1
while index <= @keys.get_length
key = @keys.get(index)
value = @values.get(index)
yield key , value
index = index + 1
end
self
end
# :rehash, :to_hash, :to_h, :to_a, :[], :fetch, :[]=, :store, :default, :default=, :default_proc, :default_proc=,
# :key, :index, :size, :length, :empty?, :each_value, :each_key, :each_pair, :each, :keys, :values,
# :values_at, :shift, :delete, :delete_if, :keep_if, :select, :select!, :reject, :reject!, :clear, :invert,