Class: Monit::Platform
- Inherits:
-
Object
- Object
- Monit::Platform
- Defined in:
- lib/monit/platform.rb
Overview
The platform section from the Monit XML
Instance Attribute Summary collapse
-
#cpu ⇒ Object
readonly
Returns the value of attribute cpu.
-
#machine ⇒ Object
readonly
Returns the value of attribute machine.
-
#memory ⇒ Object
readonly
Returns the value of attribute memory.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#release ⇒ Object
readonly
Returns the value of attribute release.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Platform
constructor
A new instance of Platform.
Constructor Details
#initialize(options = {}) ⇒ Platform
Returns a new instance of Platform.
6 7 8 9 10 11 12 13 |
# File 'lib/monit/platform.rb', line 6 def initialize( = {}) @name = ["name"] @release = ["release"] @version = ["version"] @machine = ["machine"] @cpu = ["cpu"].to_i @memory = ["memory"].to_i end |
Instance Attribute Details
#cpu ⇒ Object (readonly)
Returns the value of attribute cpu.
4 5 6 |
# File 'lib/monit/platform.rb', line 4 def cpu @cpu end |
#machine ⇒ Object (readonly)
Returns the value of attribute machine.
4 5 6 |
# File 'lib/monit/platform.rb', line 4 def machine @machine end |
#memory ⇒ Object (readonly)
Returns the value of attribute memory.
4 5 6 |
# File 'lib/monit/platform.rb', line 4 def memory @memory end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/monit/platform.rb', line 4 def name @name end |
#release ⇒ Object (readonly)
Returns the value of attribute release.
4 5 6 |
# File 'lib/monit/platform.rb', line 4 def release @release end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
4 5 6 |
# File 'lib/monit/platform.rb', line 4 def version @version end |