Class: NagiosCheck::Result
- Inherits:
-
Object
- Object
- NagiosCheck::Result
- Defined in:
- lib/nagios_check.rb
Instance Attribute Summary collapse
-
#exit_status ⇒ Object
readonly
Returns the value of attribute exit_status.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
- #critical? ⇒ Boolean
-
#initialize(exit_status, output, values) ⇒ Result
constructor
A new instance of Result.
- #ok? ⇒ Boolean
- #warning? ⇒ Boolean
Constructor Details
#initialize(exit_status, output, values) ⇒ Result
Returns a new instance of Result.
18 19 20 21 22 |
# File 'lib/nagios_check.rb', line 18 def initialize(exit_status, output, values) @exit_status = exit_status @output = output @values = values end |
Instance Attribute Details
#exit_status ⇒ Object (readonly)
Returns the value of attribute exit_status.
16 17 18 |
# File 'lib/nagios_check.rb', line 16 def exit_status @exit_status end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
16 17 18 |
# File 'lib/nagios_check.rb', line 16 def output @output end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
16 17 18 |
# File 'lib/nagios_check.rb', line 16 def values @values end |
Instance Method Details
#critical? ⇒ Boolean
24 25 26 |
# File 'lib/nagios_check.rb', line 24 def critical? exit_status == 2 end |
#ok? ⇒ Boolean
32 33 34 |
# File 'lib/nagios_check.rb', line 32 def ok? exit_status == 0 end |
#warning? ⇒ Boolean
28 29 30 |
# File 'lib/nagios_check.rb', line 28 def warning? exit_status == 1 end |