Class: Fog::Compute::Fogdocker::Image
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Fogdocker::Image
- Defined in:
- lib/fog/fogdocker/models/compute/image.rb
Instance Attribute Summary collapse
-
#info ⇒ Object
Returns the value of attribute info.
Instance Method Summary collapse
Instance Attribute Details
#info ⇒ Object
Returns the value of attribute info.
9 10 11 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 9 def info @info end |
Instance Method Details
#destroy(options = {}) ⇒ Object
24 25 26 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 24 def destroy( = {}) service.image_delete(id) end |
#name ⇒ Object
16 17 18 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 16 def name .empty? ? id : .first end |
#ready? ⇒ Boolean
20 21 22 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 20 def ready? !(status =~ /down/i) end |
#save ⇒ Object
28 29 30 31 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 28 def save raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted? service.image_create(attributes) end |
#to_s ⇒ Object
33 34 35 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 33 def to_s name end |