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
78
79
80
|
# File 'lib/monittr.rb', line 78
def inspect
%Q|<#{self.class} name="#{name}" status="#{status}" message="#{message}">|
end
|
#load ⇒ Object
69
70
71
72
|
# File 'lib/monittr.rb', line 69
def load
@table[:load]
end
|
#value(matcher, converter = :to_s) ⇒ Object
74
75
76
|
# File 'lib/monittr.rb', line 74
def value(matcher, converter=:to_s)
@xml.xpath(matcher).first.content.send(converter) rescue nil
end
|