class Vmstator::Disk

Attributes

cur[R]
merged[R]
ms[R]
name[R]
sec[R]
sectors[R]
total[R]

Public Class Methods

new(data=false) click to toggle source
# File lib/vmstator/linux/disk.rb, line 12
def initialize(data=false)
  if data
    update(data)
  end
  true
end

Public Instance Methods

update(data) click to toggle source
# File lib/vmstator/linux/disk.rb, line 19
def update(data)
  if data
    @ms      = data[:ms]      
    @cur     = data[:cur]     
    @sec     = data[:sec]
    @name    = data[:name]
    @total   = data[:total]   
    @merged  = data[:merged]  
    @sectors = data[:sectors] 
  else
    return false
  end
  true
end