Class: Barbeque::Message::Notification

Inherits:
Base
  • Object
show all
Defined in:
lib/barbeque/message/notification.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#id, #receipt_handle, #sent_timestamp, #type

Instance Method Summary collapse

Methods inherited from Base

#initialize, #valid?

Constructor Details

This class inherits a constructor from Barbeque::Message::Base

Instance Attribute Details

#applicationObject (readonly)

String

To specify ‘job_definitions.app.name`



8
9
10
# File 'lib/barbeque/message/notification.rb', line 8

def application
  @application
end

#bodyObject (readonly)

Object

free-format JSON



6
7
8
# File 'lib/barbeque/message/notification.rb', line 6

def body
  @body
end

#jobObject (readonly)

String

To specify ‘job_definitions.job`



9
10
11
# File 'lib/barbeque/message/notification.rb', line 9

def job
  @job
end

#topic_arnObject (readonly)

String

To specify ‘subscription.topic_arn`



7
8
9
# File 'lib/barbeque/message/notification.rb', line 7

def topic_arn
  @topic_arn
end

Instance Method Details

#set_params_from_subscription(subscription) ⇒ Barbeque::Message::Notification

Parameters:

  • subscription (Barneque::SNSSubscription)

Returns:



13
14
15
16
17
# File 'lib/barbeque/message/notification.rb', line 13

def set_params_from_subscription(subscription)
  @application = subscription.app.name
  @job = subscription.job_definition.job
  self
end