Class: WithEvents::Aws::Publisher

Inherits:
Object
  • Object
show all
Defined in:
lib/with_events/aws/publisher.rb

Instance Method Summary collapse

Constructor Details

#initialize(event, resource) ⇒ Publisher

Returns a new instance of Publisher.



8
9
10
11
# File 'lib/with_events/aws/publisher.rb', line 8

def initialize(event, resource)
  @event = event
  @resource = resource
end

Instance Method Details

#publishObject



13
14
15
16
# File 'lib/with_events/aws/publisher.rb', line 13

def publish
  return unless event.identifier && identifier
  topic.publish(message)
end