Class: Minpaso::PCInfo::HDD
- Inherits:
-
Object
- Object
- Minpaso::PCInfo::HDD
- Defined in:
- lib/minpaso.rb
Instance Attribute Summary collapse
-
#primary_free_space ⇒ Object
readonly
Returns the value of attribute primary_free_space.
-
#primary_size ⇒ Object
readonly
Returns the value of attribute primary_size.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#total_size ⇒ Object
readonly
Returns the value of attribute total_size.
Instance Method Summary collapse
-
#initialize(elt) ⇒ HDD
constructor
A new instance of HDD.
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_space ⇒ Object (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_size ⇒ Object (readonly)
Returns the value of attribute primary_size.
198 199 200 |
# File 'lib/minpaso.rb', line 198 def primary_size @primary_size end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
198 199 200 |
# File 'lib/minpaso.rb', line 198 def score @score end |
#total_size ⇒ Object (readonly)
Returns the value of attribute total_size.
198 199 200 |
# File 'lib/minpaso.rb', line 198 def total_size @total_size end |