Class: StormMQ::Application

Inherits:
CommandLine::Application_wo_AutoRun
  • Object
show all
Defined in:
lib/stormmq/application.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Application

Returns a new instance of Application.



17
18
19
20
21
# File 'lib/stormmq/application.rb', line 17

def initialize(*args)
  author    "Tony Byrne"
  copyright "2010, Tony Byrne & StormMQ. All rights reserved."
  super(*args)
end

Instance Method Details



35
36
37
38
39
40
41
42
# File 'lib/stormmq/application.rb', line 35

def _man_copyright
  <<-EOS
COPYRIGHT

  Copyright (c) 2010, Tony Byrne & StormMQ Ltd.
  All rights reserved.
  EOS
end

#rest_client(user) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/stormmq/application.rb', line 23

def rest_client(user)
  begin
    Rest.new(:user => user)
  rescue Error::SecretKeyNotProvidedError
    raise "Could not find the secret key for user '#{user}' - please ensure it is present in the secret key file"
  end
end

#self_testObject



31
32
33
# File 'lib/stormmq/application.rb', line 31

def self_test
  'Self test ouput goes here'
end