Class: Smith::Messaging::Sender

Inherits:
Object
  • Object
show all
Defined in:
lib/fake_smith.rb

Instance Method Summary collapse

Constructor Details

#initialize(queue_name, &blk) ⇒ Sender

Returns a new instance of Sender.



92
93
94
95
# File 'lib/fake_smith.rb', line 92

def initialize(queue_name, &blk)
  @queue_name = queue_name
  blk.call
end

Instance Method Details

#publish(message, &blk) ⇒ Object



97
98
99
100
# File 'lib/fake_smith.rb', line 97

def publish(message, &blk)
  FakeSmith.add_message(@queue_name, message)
  blk.call
end