Class: Rackspace::Configuration
- Inherits:
-
Object
- Object
- Rackspace::Configuration
- Defined in:
- lib/capistrano/rackspace.rb
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.autoscale_group ⇒ Object
Returns the value of attribute autoscale_group.
-
.region ⇒ Object
Returns the value of attribute region.
-
.username ⇒ Object
Returns the value of attribute username.
Instance Attribute Summary collapse
-
#autoscale_group ⇒ Object
readonly
Returns the value of attribute autoscale_group.
Class Method Summary collapse
Instance Method Summary collapse
- #common ⇒ Object
- #compute ⇒ Object
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
25 26 27 28 29 |
# File 'lib/capistrano/rackspace.rb', line 25 def initialize( = {}) [ :username, :api_key, :region, :autoscale_group ].each do |attr| instance_variable_set "@#{attr}", [attr] end end |
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
9 10 11 |
# File 'lib/capistrano/rackspace.rb', line 9 def api_key @api_key end |
.autoscale_group ⇒ Object
Returns the value of attribute autoscale_group.
11 12 13 |
# File 'lib/capistrano/rackspace.rb', line 11 def autoscale_group @autoscale_group end |
.region ⇒ Object
Returns the value of attribute region.
10 11 12 |
# File 'lib/capistrano/rackspace.rb', line 10 def region @region end |
.username ⇒ Object
Returns the value of attribute username.
8 9 10 |
# File 'lib/capistrano/rackspace.rb', line 8 def username @username end |
Instance Attribute Details
#autoscale_group ⇒ Object (readonly)
Returns the value of attribute autoscale_group.
14 15 16 |
# File 'lib/capistrano/rackspace.rb', line 14 def autoscale_group @autoscale_group end |
Class Method Details
.instantiate ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/capistrano/rackspace.rb', line 16 def self.instantiate new( :username => username, :api_key => api_key, :region => region, :autoscale_group => autoscale_group ) end |
Instance Method Details
#common ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/capistrano/rackspace.rb', line 31 def common { :rackspace_username => @username, :rackspace_api_key => @api_key, :rackspace_region => @region } end |
#compute ⇒ Object
39 40 41 |
# File 'lib/capistrano/rackspace.rb', line 39 def compute common.merge(:provider => 'Rackspace', :version => :v2) end |