Class: Aws::Broker::Publisher
Instance Method Summary collapse
-
#initialize(topic, message) ⇒ Publisher
constructor
A new instance of Publisher.
- #publish ⇒ Object
Constructor Details
#initialize(topic, message) ⇒ Publisher
Returns a new instance of Publisher.
7 8 9 10 |
# File 'lib/aws/broker/publisher.rb', line 7 def initialize(topic, ) @topic = topic @message = end |
Instance Method Details
#publish ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/aws/broker/publisher.rb', line 12 def publish return unless enabled? create_topic sns.publish( topic_arn: @topic_arn, message: @message.to_json ) end |