Class: Minpaso::PCInfo::HDD

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elt) ⇒ HDD

Returns a new instance of HDD.



199
200
201
202
203
204
205
206
207
208
# File 'lib/minpaso.rb', line 199

def initialize(elt)
  elt.elements.each do |e|
    case e.name
    when "Score"; @score = e.text.to_f
    when "PrimarySize"; @primary_size = e.text.to_i.byte
    when "PrimaryFreeSpace"; @primary_free_space = e.text.to_i.byte
    when "TotalSize"; @total_size = e.text.to_i.byte
    end
  end
end

Instance Attribute Details

#primary_free_spaceObject (readonly)

Returns the value of attribute primary_free_space.



198
199
200
# File 'lib/minpaso.rb', line 198

def primary_free_space
  @primary_free_space
end

#primary_sizeObject (readonly)

Returns the value of attribute primary_size.



198
199
200
# File 'lib/minpaso.rb', line 198

def primary_size
  @primary_size
end

#scoreObject (readonly)

Returns the value of attribute score.



198
199
200
# File 'lib/minpaso.rb', line 198

def score
  @score
end

#total_sizeObject (readonly)

Returns the value of attribute total_size.



198
199
200
# File 'lib/minpaso.rb', line 198

def total_size
  @total_size
end