Class: Sensu::Plugin::Check::CLI
Instance Attribute Summary
#argv
Class Method Summary
collapse
Instance Method Summary
collapse
#initialize, method_added, #run
Class Method Details
.check_name(name = nil) ⇒ Object
9
10
11
12
13
14
15
|
# File 'lib/sensu-plugin/check/cli.rb', line 9
def check_name(name=nil)
if name
@check_name = name
else
@check_name || self.to_s
end
end
|
Instance Method Details
#message(msg) ⇒ Object
18
19
20
|
# File 'lib/sensu-plugin/check/cli.rb', line 18
def message(msg)
@message = msg
end
|
#output(msg = @message) ⇒ Object
22
23
24
|
# File 'lib/sensu-plugin/check/cli.rb', line 22
def output(msg=@message)
puts "#{self.class.check_name} #{@status}" + (msg ? ": #{msg}" : "")
end
|