class Sensu::Plugin::CLI
Attributes
argv[RW]
Public Class Methods
method_added(name)
click to toggle source
# File lib/sensu-plugin/cli.rb, line 49 def method_added(name) @@autorun = self if name == :run end
new(argv = ARGV)
click to toggle source
Calls superclass method
# File lib/sensu-plugin/cli.rb, line 14 def initialize(argv = ARGV) super() self.argv = 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 22 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 39 def run unknown 'Not implemented! You should override Sensu::Plugin::CLI#run.' end