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.
7 8 9 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 7 def info @info end |
Instance Method Details
#destroy(options = {}) ⇒ Object
22 23 24 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 22 def destroy( = {}) service.image_delete(id) end |
#name ⇒ Object
14 15 16 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 14 def name .empty? ? id : .first end |
#ready? ⇒ Boolean
18 19 20 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 18 def ready? !(status =~ /down/i) end |
#save ⇒ Object
26 27 28 29 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 26 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
31 32 33 |
# File 'lib/fog/fogdocker/models/compute/image.rb', line 31 def to_s name end |