Class: RabbitHutch::CLI

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

Overview

This class controls the Command Line Interface

Constant Summary collapse

StandardTemplate =
<<-TEMPLATE
{{#config}}

{{#application}}
Application
+------------------------+------------------------+
|Exchange                |Queue                   |
+------------------------+------------------------+
|{{exchangename}}        |  {{queuename}}         |
+------------------------+------------------------+
{{/application}}

{{#rabbitmq}}
RabbitMq Servers
+------------------------+------------------------+
|Display Name                |Host                   |
+------------------------+------------------------+
{{#hosts}}
|{{displayname}}        |  {{hostname}}         |
+------------------------+------------------------+
{{/hosts}}
{{/rabbitmq}}

{{/config}}
TEMPLATE

Instance Method Summary collapse

Instance Method Details

#listObject

method_option :recursive, :aliases => “-r”, :type => :boolean, :default => “false”, :desc => “true = recurse through sub directories, false = only do top directory”



40
41
42
43
# File 'lib/rabbithutchmgr.rb', line 40

def list()
  @config = RabbitHutch::Configurator.new(options)
  puts Mustache.render(StandardTemplate,  :config => @config);
end