Class: Fog::Ovirt::Compute::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



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_sObject



31
32
33
# File 'lib/fog/ovirt/models/compute/volume.rb', line 31

def to_s
  id
end