Class: Dionysus::Producer::Key

Inherits:
Object
  • Object
show all
Defined in:
lib/dionysus/producer/key.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ Key

Returns a new instance of Key.



7
8
9
# File 'lib/dionysus/producer/key.rb', line 7

def initialize(resource)
  @resource = resource
end

Instance Method Details

#to_keyObject



11
12
13
# File 'lib/dionysus/producer/key.rb', line 11

def to_key
  "#{resource.model_name}:#{resource.id}"
end