Class: Mastercontrol::Server::DiskPartition

Inherits:
Object
  • Object
show all
Defined in:
lib/mastercontrol/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(res_disk, res_filesystem, res_mount, res_used, res_percentage, res_total, res_available) ⇒ DiskPartition

Returns a new instance of DiskPartition.



25
26
27
28
29
30
31
32
33
# File 'lib/mastercontrol/server.rb', line 25

def initialize(res_disk, res_filesystem, res_mount, res_used, res_percentage, res_total, res_available)
  @disk = res_disk
  @filesystem = res_filesystem
  @mount = res_mount
  @used = res_used.to_i
  @percentage = res_percentage.to_f
  @total = res_total.to_i
  @available = res_available.to_i
end

Instance Attribute Details

#availableObject

Returns the value of attribute available.



24
25
26
# File 'lib/mastercontrol/server.rb', line 24

def available
  @available
end

#diskObject

Returns the value of attribute disk.



24
25
26
# File 'lib/mastercontrol/server.rb', line 24

def disk
  @disk
end

#filesystemObject

Returns the value of attribute filesystem.



24
25
26
# File 'lib/mastercontrol/server.rb', line 24

def filesystem
  @filesystem
end

#mountObject

Returns the value of attribute mount.



24
25
26
# File 'lib/mastercontrol/server.rb', line 24

def mount
  @mount
end

#percentageObject

Returns the value of attribute percentage.



24
25
26
# File 'lib/mastercontrol/server.rb', line 24

def percentage
  @percentage
end

#totalObject

Returns the value of attribute total.



24
25
26
# File 'lib/mastercontrol/server.rb', line 24

def total
  @total
end

#usedObject

Returns the value of attribute used.



24
25
26
# File 'lib/mastercontrol/server.rb', line 24

def used
  @used
end