Class: Colombo::Image

Inherits:
Resource show all
Defined in:
lib/colombo/image.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Colombo::Resource

Instance Attribute Details

#distributionObject

Returns the value of attribute distribution.



6
7
8
# File 'lib/colombo/image.rb', line 6

def distribution
  @distribution
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/colombo/image.rb', line 6

def id
  @id
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/colombo/image.rb', line 6

def name
  @name
end

Instance Method Details

#destroy(confirm = false) ⇒ Object



8
9
10
11
12
13
# File 'lib/colombo/image.rb', line 8

def destroy(confirm=false)
  raise 'must pass true for confirm' unless confirm
  @client.request(:get, "/images/#{self.id}/destroy/") do |response|
    return response['event_id']
  end
end