Class: Roark::Aws::Connection
- Inherits:
-
Object
- Object
- Roark::Aws::Connection
- Defined in:
- lib/roark/aws/connection.rb
Instance Attribute Summary collapse
-
#region ⇒ Object
Returns the value of attribute region.
Instance Method Summary collapse
- #cf ⇒ Object
- #config ⇒ Object
- #ec2 ⇒ Object
-
#initialize(args) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(args) ⇒ Connection
Returns a new instance of Connection.
7 8 9 10 11 |
# File 'lib/roark/aws/connection.rb', line 7 def initialize(args) @access_key_id = args[:access_key_id] @secret_access_key = args[:secret_access_key] @region = args[:region] end |
Instance Attribute Details
#region ⇒ Object
Returns the value of attribute region.
5 6 7 |
# File 'lib/roark/aws/connection.rb', line 5 def region @region end |
Instance Method Details
#cf ⇒ Object
19 20 21 |
# File 'lib/roark/aws/connection.rb', line 19 def cf @cf ||= AWS::CloudFormation.new config end |
#config ⇒ Object
13 14 15 16 17 |
# File 'lib/roark/aws/connection.rb', line 13 def config { :access_key_id => @access_key_id, :secret_access_key => @secret_access_key, :region => @region } end |
#ec2 ⇒ Object
23 24 25 |
# File 'lib/roark/aws/connection.rb', line 23 def ec2 @ec2 ||= AWS::EC2.new config end |