Skip to content

Commit

Permalink
Added DistRedis#type.
Browse files Browse the repository at this point in the history
  • Loading branch information
djanowski committed Apr 8, 2010
1 parent 3ecdcdc commit 20f4a1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/redis/dist_redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def keys_by_node(*keyz)
kbn
end
end

def type(key)
method_missing(:type, key)
end
end
end

Expand Down
1 change: 1 addition & 0 deletions test/redis_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ def redis.call_command(attrs)
end

assert_equal "0", @r.keys("*").sort.first
assert_equal "string", @r.type("1")
end
end

Expand Down

0 comments on commit 20f4a1a

Please sign in to comment.