Class: CycloneLariat::Publisher

Inherits:
Object
  • Object
show all
Includes:
Generators::Command, Generators::Event
Defined in:
lib/cyclone_lariat/publisher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Generators::Command

#command, #command_v1, #command_v2

Methods included from Generators::Event

#event, #event_v1, #event_v2

Constructor Details

#initialize(**options) ⇒ Publisher

Returns a new instance of Publisher.



13
14
15
# File 'lib/cyclone_lariat/publisher.rb', line 13

def initialize(**options)
  @config = CycloneLariat::Options.wrap(options).merge!(CycloneLariat.config)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



11
12
13
# File 'lib/cyclone_lariat/publisher.rb', line 11

def config
  @config
end

Instance Method Details

#snsObject



21
22
23
# File 'lib/cyclone_lariat/publisher.rb', line 21

def sns
  @sns ||= Clients::Sns.new(**config.to_h)
end

#sqsObject



17
18
19
# File 'lib/cyclone_lariat/publisher.rb', line 17

def sqs
  @sqs ||= Clients::Sqs.new(**config.to_h)
end