Class: Fog::Compute::Ovirt::Volume

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/ovirt/models/compute/volume.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rawObject

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_gbObject



21
22
23
# File 'lib/fog/ovirt/models/compute/volume.rb', line 21

def size_gb
  attributes[:size_gb] ||= attributes[:size].to_i / Fog::Compute::Ovirt::DISK_SIZE_TO_GB if attributes[:size]
end

#size_gb=(size) ⇒ Object



25
26
27
# File 'lib/fog/ovirt/models/compute/volume.rb', line 25

def size_gb=(size)
  attributes[:size] = size.to_i * Fog::Compute::Ovirt::DISK_SIZE_TO_GB if size
end

#to_sObject



29
30
31
# File 'lib/fog/ovirt/models/compute/volume.rb', line 29

def to_s
  id
end