Class: PipelineToolkit::CLI::MsgSinkCLI

Inherits:
Object
  • Object
show all
Defined in:
lib/pipeline_toolkit/cli/msg_sink_cli.rb

Class Method Summary collapse

Class Method Details

.execute(stdout, arguments = []) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/pipeline_toolkit/cli/msg_sink_cli.rb', line 8

def self.execute(stdout, arguments=[])

  opts = Trollop::options do
    banner <<-EOL
Message Sink
------------
  Swallows messages but still acknowledges them (like a /dev/null, but with acks)
  
  Usage:
  msg_sink
      EOL

    opt :acknowledge, "If flag is set then messages are acknowledged", :type => :flag, :short => :a
    opt :out, "If flag is set then messages are printed to stdout in plain-text", :type => :flag, :short => :o
    opt :env, "The environment to run (development, production)", :default => "development", :short => :e
  end

  MessageSink.new(opts).start
end