class Naginata::StatusDecorator
Attributes
object[R]
Public Class Methods
new(status)
click to toggle source
# File lib/naginata/status_decorator.rb, line 8 def initialize(status) @object = status end
Public Instance Methods
hosts_table()
click to toggle source
# File lib/naginata/status_decorator.rb, line 12 def hosts_table object.host_items.sort.map do |section| [object.nagios, section.host_name, section.decorate.current_state, section.decorate.flags_short, section.plugin_output] end end
services_table()
click to toggle source
# File lib/naginata/status_decorator.rb, line 18 def services_table object.service_items.sort.map do |section| [object.nagios, section.host_name, section.service_description, section.decorate.current_state, section.decorate.flags_short, section.plugin_output] end end