Class: Dionysus::Producer::Outbox::EventName
- Inherits:
-
Object
- Object
- Dionysus::Producer::Outbox::EventName
- Defined in:
- lib/dionysus/producer/outbox/event_name.rb
Instance Method Summary collapse
- #created ⇒ Object
- #destroyed ⇒ Object
- #for_event_type(type) ⇒ Object
-
#initialize(resource_name) ⇒ EventName
constructor
A new instance of EventName.
- #updated ⇒ Object
Constructor Details
#initialize(resource_name) ⇒ EventName
Returns a new instance of EventName.
7 8 9 |
# File 'lib/dionysus/producer/outbox/event_name.rb', line 7 def initialize(resource_name) @resource_name = resource_name end |
Instance Method Details
#created ⇒ Object
11 12 13 |
# File 'lib/dionysus/producer/outbox/event_name.rb', line 11 def created "#{resource_name}_created" end |
#destroyed ⇒ Object
19 20 21 |
# File 'lib/dionysus/producer/outbox/event_name.rb', line 19 def destroyed "#{resource_name}_destroyed" end |
#for_event_type(type) ⇒ Object
23 24 25 |
# File 'lib/dionysus/producer/outbox/event_name.rb', line 23 def for_event_type(type) public_send(type) end |
#updated ⇒ Object
15 16 17 |
# File 'lib/dionysus/producer/outbox/event_name.rb', line 15 def updated "#{resource_name}_updated" end |