Sha256: 04cff3cb22e40eaf866af97f02c8675470591f9cfe53f98b3a514e54f239645b
Contents?: true
Size: 912 Bytes
Versions: 5
Compression:
Stored size: 912 Bytes
Contents
module Brightbox class Image < Api def to_row o = fog_model.attributes o[:id] = fog_model.id if status == "available" o[:status] = (public ? 'public' : 'private') else o[:status] = status end o[:arch] = arch o[:name] = name.to_s + " (#{arch})" o[:owner] = owner_id if official o[:type] = "official" o[:owner] = "brightbox" else o[:type] = source_type end o[:created_at] = created_at o[:created_on] = created_at.to_s.split('T').first o[:description] = description if description o[:size] = virtual_size o end def public? public end def self.all conn.images end def self.get(id) conn.images.get(id) end def self.default_field_order [:id, :owner, :type, :created_on, :status, :size, :name] end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
bbcloud-0.8.2 | lib/bbcloud/images.rb |
bbcloud-0.8.1 | lib/bbcloud/images.rb |
bbcloud-0.8 | lib/bbcloud/images.rb |
bbcloud-0.7 | lib/bbcloud/images.rb |
bbcloud-0.6.2 | lib/bbcloud/images.rb |