Class: Composer::AWS::EC2
- Inherits:
-
Object
- Object
- Composer::AWS::EC2
- Defined in:
- lib/composer/aws/ec2.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ EC2
constructor
A new instance of EC2.
- #key_pairs ⇒ Object
Constructor Details
#initialize(args) ⇒ EC2
Returns a new instance of EC2.
4 5 6 7 8 |
# File 'lib/composer/aws/ec2.rb', line 4 def initialize(args) @config = args[:config] @logger = @config.logger @region = @config.region end |
Instance Method Details
#key_pairs ⇒ Object
10 11 12 13 14 |
# File 'lib/composer/aws/ec2.rb', line 10 def key_pairs ec2.regions[@region].key_pairs rescue ::AWS::EC2::Errors::AuthFailure => e raise Composer::AwsEc2Error.new e. end |