Class: Nagios::Promoo::Opennebula::Master

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

Overview

Master class for all OpenNebula 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/opennebula/master.rb', line 37

def available_probes
  probes = Nagios::Promoo::Opennebula::Probes.constants.collect do |probe|
    Nagios::Promoo::Opennebula::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/opennebula/master.rb', line 33

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

Instance Method Details

#versionObject



67
68
69
# File 'lib/nagios/promoo/opennebula/master.rb', line 67

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