Class: Dionysus::Producer::Key
- Inherits:
-
Object
- Object
- Dionysus::Producer::Key
- Defined in:
- lib/dionysus/producer/key.rb
Instance Method Summary collapse
-
#initialize(resource) ⇒ Key
constructor
A new instance of Key.
- #to_key ⇒ Object
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_key ⇒ Object
11 12 13 |
# File 'lib/dionysus/producer/key.rb', line 11 def to_key "#{resource.model_name}:#{resource.id}" end |