class NagiosAnalyzer::SectionDecorator
Attributes
object[R]
Public Class Methods
new(section)
click to toggle source
# File lib/nagios_analyzer/section_decorator.rb, line 18 def initialize(section) @object = section end
Public Instance Methods
current_state()
click to toggle source
# File lib/nagios_analyzer/section_decorator.rb, line 22 def current_state if object.current_state Status::STATES[object.current_state] end end
flags_short()
click to toggle source
# File lib/nagios_analyzer/section_decorator.rb, line 28 def flags_short ret = [] ret.push (object.active_checks_enabled == 1) ? "AC": "ac" ret.push (object.notifications_enabled == 1) ? "NT": "nt" ret.join(",") end