Class: Nagios::Promoo::Appdb::Master

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

Overview

Master class for all AppDB probes.

Author:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.available_probesObject



34
35
36
37
38
39
# File 'lib/nagios/promoo/appdb/master.rb', line 34

def available_probes
  probes = Nagios::Promoo::Appdb::Probes.constants.collect do |probe|
    Nagios::Promoo::Appdb::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



30
31
32
# File 'lib/nagios/promoo/appdb/master.rb', line 30

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

Instance Method Details

#versionObject



61
62
63
# File 'lib/nagios/promoo/appdb/master.rb', line 61

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