Class: RackspaceCloud::Image
- Inherits:
-
Object
- Object
- RackspaceCloud::Image
- Defined in:
- lib/rackspace_cloud/image.rb
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Returns the value of attribute created.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#rackspace_id ⇒ Object
readonly
Returns the value of attribute rackspace_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#updated ⇒ Object
readonly
Returns the value of attribute updated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(image_json) ⇒ Image
constructor
A new instance of Image.
- #refresh ⇒ Object
- #to_i ⇒ Object
Constructor Details
#initialize(image_json) ⇒ Image
Returns a new instance of Image.
11 12 13 14 15 16 17 |
# File 'lib/rackspace_cloud/image.rb', line 11 def initialize(image_json) @rackspace_id = image_json['id'] @name = image_json['name'] @created = image_json['created'] @updated = image_json['updated'] @status = image_json['status'] end |
Instance Attribute Details
#created ⇒ Object (readonly)
Returns the value of attribute created.
3 4 5 |
# File 'lib/rackspace_cloud/image.rb', line 3 def created @created end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rackspace_cloud/image.rb', line 3 def name @name end |
#rackspace_id ⇒ Object (readonly)
Returns the value of attribute rackspace_id.
3 4 5 |
# File 'lib/rackspace_cloud/image.rb', line 3 def rackspace_id @rackspace_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/rackspace_cloud/image.rb', line 3 def status @status end |
#updated ⇒ Object (readonly)
Returns the value of attribute updated.
3 4 5 |
# File 'lib/rackspace_cloud/image.rb', line 3 def updated @updated end |
Class Method Details
.lookup_by_id(id) ⇒ Object
6 7 8 |
# File 'lib/rackspace_cloud/image.rb', line 6 def lookup_by_id(id) RackspaceCloud::IMAGES[id] end |
Instance Method Details
#refresh ⇒ Object
23 24 |
# File 'lib/rackspace_cloud/image.rb', line 23 def refresh end |
#to_i ⇒ Object
19 20 21 |
# File 'lib/rackspace_cloud/image.rb', line 19 def to_i @rackspace_id end |