Class: Breadcrumbs::Key
- Inherits:
-
Object
- Object
- Breadcrumbs::Key
- Defined in:
- lib/redis-breadcrumbs/key.rb
Direct Known Subclasses
Instance Method Summary collapse
- #clean_cmd ⇒ Object
-
#initialize(key_template) ⇒ Key
constructor
A new instance of Key.
- #specialize(object) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(key_template) ⇒ Key
Returns a new instance of Key.
3 4 5 |
# File 'lib/redis-breadcrumbs/key.rb', line 3 def initialize key_template @key_template = key_template end |
Instance Method Details
#clean_cmd ⇒ Object
11 12 13 |
# File 'lib/redis-breadcrumbs/key.rb', line 11 def clean_cmd raise "Can't clean this key #{@key_template}" end |
#specialize(object) ⇒ Object
7 8 9 |
# File 'lib/redis-breadcrumbs/key.rb', line 7 def specialize object Key.new specialize_from_template(@key_template, object) end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/redis-breadcrumbs/key.rb', line 15 def to_s @key_template end |