Sha256: d1eb7a02a1cf922824931f3b916a03d37e9c3d8aef5148947d4fa89bca27062b
Contents?: true
Size: 685 Bytes
Versions: 19
Compression:
Stored size: 685 Bytes
Contents
module Fog module Compute class Ovirt class Volume < Fog::Model attr_accessor :raw DISK_SIZE_TO_GB = 1073741824 identity :id attribute :storage_domain attribute :size attribute :disk_type attribute :bootable attribute :interface attribute :format attribute :sparse attribute :size_gb def size_gb attributes[:size_gb] ||= attributes[:size].to_i / DISK_SIZE_TO_GB if attributes[:size] end def size_gb= s attributes[:size] = s.to_i * DISK_SIZE_TO_GB if s end def to_s id end end end end end
Version data entries
19 entries across 19 versions & 9 rubygems