Class: Breadcrumbs::OwnedKey
- Defined in:
- lib/redis-breadcrumbs/owned_key.rb
Instance Method Summary collapse
- #clean_cmd ⇒ Object
-
#initialize(key_template, options) ⇒ OwnedKey
constructor
A new instance of OwnedKey.
- #key_name ⇒ Object
- #reset_cmd ⇒ Object
- #specialize(object) ⇒ Object
Methods inherited from Key
Constructor Details
#initialize(key_template, options) ⇒ OwnedKey
Returns a new instance of OwnedKey.
3 4 5 6 7 |
# File 'lib/redis-breadcrumbs/owned_key.rb', line 3 def initialize key_template, @options = || {} @key_template = key_template @resetable = [:reset] end |
Instance Method Details
#clean_cmd ⇒ Object
13 14 15 |
# File 'lib/redis-breadcrumbs/owned_key.rb', line 13 def clean_cmd [:del, @key_template] end |
#key_name ⇒ Object
21 22 23 |
# File 'lib/redis-breadcrumbs/owned_key.rb', line 21 def key_name @key_template end |
#reset_cmd ⇒ Object
17 18 19 |
# File 'lib/redis-breadcrumbs/owned_key.rb', line 17 def reset_cmd clean_cmd if @resetable end |