class Sensu::Plugin::CLI

Attributes

argv[RW]

Public Class Methods

method_added(name) click to toggle source
# File lib/sensu-plugin/cli.rb, line 46
def method_added(name)
  if name == :run
    @@autorun = self
  end
end
new(argv=ARGV) click to toggle source
Calls superclass method
# File lib/sensu-plugin/cli.rb, line 11
def initialize(argv=ARGV)
  super()
  self.argv = self.parse_options(argv)
end

Public Instance Methods

output(*args) click to toggle source

Implementing classes should override this to produce appropriate output for their handler.

# File lib/sensu-plugin/cli.rb, line 19
def output(*args)
  puts "Sensu::Plugin::CLI: #{args}"
end
run() click to toggle source

Implementing classes must override this.

# File lib/sensu-plugin/cli.rb, line 36
def run
  unknown "Not implemented! You should override Sensu::Plugin::CLI#run."
end