Class: RackspaceCloud::Flavor
- Inherits:
-
Object
- Object
- RackspaceCloud::Flavor
- Defined in:
- lib/rackspace_cloud/flavor.rb
Instance Attribute Summary collapse
-
#disk ⇒ Object
readonly
Returns the value of attribute disk.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#rackspace_id ⇒ Object
readonly
Returns the value of attribute rackspace_id.
-
#ram ⇒ Object
readonly
Returns the value of attribute ram.
Instance Method Summary collapse
-
#initialize(flavor_json) ⇒ Flavor
constructor
A new instance of Flavor.
- #to_i ⇒ Object
Constructor Details
#initialize(flavor_json) ⇒ Flavor
Returns a new instance of Flavor.
5 6 7 8 9 10 |
# File 'lib/rackspace_cloud/flavor.rb', line 5 def initialize(flavor_json) @rackspace_id = flavor_json['id'] @name = flavor_json['name'] @disk = flavor_json['disk'] @ram = flavor_json['ram'] end |
Instance Attribute Details
#disk ⇒ Object (readonly)
Returns the value of attribute disk.
3 4 5 |
# File 'lib/rackspace_cloud/flavor.rb', line 3 def disk @disk end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rackspace_cloud/flavor.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/flavor.rb', line 3 def rackspace_id @rackspace_id end |
#ram ⇒ Object (readonly)
Returns the value of attribute ram.
3 4 5 |
# File 'lib/rackspace_cloud/flavor.rb', line 3 def ram @ram end |
Instance Method Details
#to_i ⇒ Object
12 13 14 |
# File 'lib/rackspace_cloud/flavor.rb', line 12 def to_i @rackspace_id end |