Class: Monittr::Services::Base
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Monittr::Services::Base
show all
- Defined in:
- lib/monittr.rb
Constant Summary
collapse
- TYPES =
{ 0 => "Filesystem", 1 => "Directory", 2 => "File", 3 => "Daemon", 4 => "Connection", 5 => "System" }
Instance Method Summary
collapse
Instance Method Details
#inspect ⇒ Object
81
82
83
|
# File 'lib/monittr.rb', line 81
def inspect
%Q|<#{self.class} name="#{name}" status="#{status}" message="#{message}">|
end
|
#load ⇒ Object
72
73
74
75
|
# File 'lib/monittr.rb', line 72
def load
@table[:load]
end
|
#value(matcher, converter = :to_s) ⇒ Object
77
78
79
|
# File 'lib/monittr.rb', line 77
def value(matcher, converter=:to_s)
@xml.xpath(matcher).first.content.send(converter) rescue nil
end
|