Class: Fog::Compute::Ovirt::Volume
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Ovirt::Volume
- Defined in:
- lib/fog/ovirt/models/compute/volume.rb
Constant Summary collapse
- DISK_SIZE_TO_GB =
1073741824
Instance Attribute Summary collapse
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
Instance Attribute Details
#raw ⇒ Object
Returns the value of attribute raw.
5 6 7 |
# File 'lib/fog/ovirt/models/compute/volume.rb', line 5 def raw @raw end |
Instance Method Details
#size_gb ⇒ Object
20 21 22 |
# File 'lib/fog/ovirt/models/compute/volume.rb', line 20 def size_gb attributes[:size_gb] ||= attributes[:size].to_i / DISK_SIZE_TO_GB if attributes[:size] end |
#size_gb=(s) ⇒ Object
24 25 26 |
# File 'lib/fog/ovirt/models/compute/volume.rb', line 24 def size_gb= s attributes[:size] = s.to_i * DISK_SIZE_TO_GB if s end |
#to_s ⇒ Object
28 29 30 |
# File 'lib/fog/ovirt/models/compute/volume.rb', line 28 def to_s id end |