Module: Swagger::Commands::Keys
- Included in:
- Redis
- Defined in:
- lib/swagger/commands/keys.rb
Instance Method Summary collapse
Instance Method Details
#del(key) ⇒ Object
5 6 7 8 |
# File 'lib/swagger/commands/keys.rb', line 5 def del(key) ResqueValue.delete_all(:key => key.to_s) nil end |
#exists(key) ⇒ Object
10 11 12 |
# File 'lib/swagger/commands/keys.rb', line 10 def exists(key) ResqueValue.exists?(:key => key.to_s) end |
#keys(pattern = '*') ⇒ Object
14 15 16 17 |
# File 'lib/swagger/commands/keys.rb', line 14 def keys(pattern = '*') raise "Pattern '#{pattern}' not supported" if pattern != '*' ResqueValue.all(:select => 'DISTINCT resque_values.key').map(&:key) end |