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