Class: Smith::Commands::Subscribe

Inherits:
Smith::CommandBase show all
Defined in:
lib/smith/commands/smithctl/subscribe.rb

Instance Attribute Summary

Attributes inherited from Smith::CommandBase

#options, #target

Instance Method Summary collapse

Methods inherited from Smith::CommandBase

#banner, #format_help, #initialize, #parse_options

Methods included from Logger

included

Constructor Details

This class inherits a constructor from Smith::CommandBase

Instance Method Details

#executeObject



5
6
7
8
9
10
11
# File 'lib/smith/commands/smithctl/subscribe.rb', line 5

def execute
  Messaging::Receiver.new(target.first, amqp_opts) do |receiver|
    receiver.subscribe do |payload, r|
      pp payload
    end
  end
end