Class: Monit::Platform

Inherits:
Object
  • Object
show all
Defined in:
lib/monit/platform.rb

Overview

The platform section from the Monit XML

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options = {})
  @name = options["name"]
  @release = options["release"]
  @version = options["version"]
  @machine = options["machine"]
  @cpu = options["cpu"].to_i
  @memory = options["memory"].to_i
end

Instance Attribute Details

#cpuObject (readonly)

Returns the value of attribute cpu.



4
5
6
# File 'lib/monit/platform.rb', line 4

def cpu
  @cpu
end

#machineObject (readonly)

Returns the value of attribute machine.



4
5
6
# File 'lib/monit/platform.rb', line 4

def machine
  @machine
end

#memoryObject (readonly)

Returns the value of attribute memory.



4
5
6
# File 'lib/monit/platform.rb', line 4

def memory
  @memory
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/monit/platform.rb', line 4

def name
  @name
end

#releaseObject (readonly)

Returns the value of attribute release.



4
5
6
# File 'lib/monit/platform.rb', line 4

def release
  @release
end

#versionObject (readonly)

Returns the value of attribute version.



4
5
6
# File 'lib/monit/platform.rb', line 4

def version
  @version
end