Class: Fog::AWS::EC2::Flavors
- Inherits:
-
Collection
- Object
- Array
- Collection
- Fog::AWS::EC2::Flavors
- Defined in:
- lib/fog/aws/models/ec2/flavors.rb
Instance Method Summary collapse
Methods inherited from Collection
#_dump, _load, aliases, attribute, attributes, #attributes, #connection, #connection=, #create, #initialize, #inspect, #load, #merge_attributes, #model, model, #new, #reload, #table, #to_json
Constructor Details
This class inherits a constructor from Fog::Collection
Instance Method Details
#all ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/fog/aws/models/ec2/flavors.rb', line 24 def all data = [ { :bits => 32, :cores => 1, :disk => 160, :id => 'm1.small', :name => 'Small Instance', :ram => 1740.8}, { :bits => 64, :cores => 4, :disk => 850, :id => 'm1.large', :name => 'Large Instance', :ram => 7680}, { :bits => 64, :cores => 8, :disk => 1690, :id => 'm1.xlarge', :name => 'Extra Large Instance', :ram => 15360}, { :bits => 32, :cores => 5, :disk => 350, :id => 'c1.medium', :name => 'High-CPU Medium', :ram => 1740.8}, { :bits => 64, :cores => 20, :disk => 1690, :id => 'c1.xlarge', :name => 'High-CPU Extra Large', :ram => 7168}, { :bits => 64, :cores => 13, :disk => 850, :id => 'm2.2xlarge', :name => 'High Memory Double Extra Large', :ram => 35020.8}, { :bits => 64, :cores => 26, :disk => 1690, :id => 'm2.4xlarge', :name => 'High Memory Quadruple Extra Large', :ram => 70041.6}, ] load(data) self end |
#get(flavor_id) ⇒ Object
40 41 42 |
# File 'lib/fog/aws/models/ec2/flavors.rb', line 40 def get(flavor_id) all.detect {|flavor| flavor.id == flavor_id} end |