Class: Nagios::Promoo::Occi::Master

Inherits:
Thor
  • Object
show all
Defined in:
lib/nagios/promoo/occi/master.rb

Overview

Master class for all OCCI probes.

Author:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.available_probesObject



37
38
39
40
41
42
# File 'lib/nagios/promoo/occi/master.rb', line 37

def available_probes
  probes = Nagios::Promoo::Occi::Probes.constants.collect do |probe|
    Nagios::Promoo::Occi::Probes.const_get(probe)
  end
  probes.select(&:runnable?)
end

Hack to override the help message produced by Thor. github.com/wycats/thor/issues/261#issuecomment-16880836



33
34
35
# File 'lib/nagios/promoo/occi/master.rb', line 33

def banner(command, _namespace = nil, _subcommand = nil)
  "#{basename} occi #{command.usage}"
end

Instance Method Details

#versionObject



70
71
72
# File 'lib/nagios/promoo/occi/master.rb', line 70

def version
  puts Nagios::Promoo::Occi::VERSION
end