Class: Fog::Ovirt::Compute::Volume
- Inherits:
-
Model
- Object
- Model
- Fog::Ovirt::Compute::Volume
- Defined in:
- lib/fog/ovirt/models/compute/volume.rb
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
23 24 25 |
# File 'lib/fog/ovirt/models/compute/volume.rb', line 23 def size_gb attributes[:size_gb] ||= attributes[:size].to_i / Fog::Ovirt::Compute::DISK_SIZE_TO_GB if attributes[:size] end |
#size_gb=(size) ⇒ Object
27 28 29 |
# File 'lib/fog/ovirt/models/compute/volume.rb', line 27 def size_gb=(size) attributes[:size] = size.to_i * Fog::Ovirt::Compute::DISK_SIZE_TO_GB if size end |
#to_s ⇒ Object
31 32 33 |
# File 'lib/fog/ovirt/models/compute/volume.rb', line 31 def to_s id end |