Class: Dionysus::Producer::Outbox::EventName

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

Instance Method Summary collapse

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

#createdObject



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

def created
  "#{resource_name}_created"
end

#destroyedObject



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

#updatedObject



15
16
17
# File 'lib/dionysus/producer/outbox/event_name.rb', line 15

def updated
  "#{resource_name}_updated"
end