Permalink
Browse files

implemented hvals

  • Loading branch information...
Jay Adkisson
Jay Adkisson committed May 22, 2010
1 parent a27f5b3 commit 03610a078ca343c9b782e86ac6e87488bd9cdd37
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/mock_redis/hash.rb
View
@@ -40,6 +40,14 @@ def hkeys(key)
end
end
+ def hvals(key)
+ case h = self.hash[key]
+ when nil ; []
+ when Hash ; h.values
+ else fail "Not a hash"
+ end
+ end
+
def hlen(key)
case h = self.hash[key]
when nil ; 0

0 comments on commit 03610a0

Please sign in to comment.