Class: Breadcrumbs::Key

Inherits:
Object
  • Object
show all
Defined in:
lib/redis-breadcrumbs/key.rb

Direct Known Subclasses

MemberOfSetKey, OwnedKey

Instance Method Summary collapse

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_cmdObject



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_sObject



15
16
17
# File 'lib/redis-breadcrumbs/key.rb', line 15

def to_s
  @key_template
end