Sha256: d5db357d8eb8cbfc32bd8ef14a98b0754150da62d25c11bd9c62581cd54d59ab

Contents?: true

Size: 628 Bytes

Versions: 4

Compression:

Stored size: 628 Bytes

Contents

module Vmstator

  class Disk
    attr_reader :ms
    attr_reader :cur
    attr_reader :sec
    attr_reader :name
    attr_reader :total
    attr_reader :merged  
    attr_reader :sectors

    def initialize(data=false)
      if data
        update(data)
      end
      true
    end

    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

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vmstator-2.1.0 lib/vmstator/linux/disk.rb
vmstator-2.0.4 lib/vmstator/disk.rb
vmstator-2.0.3 lib/vmstator/disk.rb
vmstator-2.0.2 lib/vmstator/disk.rb