Class: CloudProviders::Ec2Helper
Direct Known Subclasses
Authorize, ElasticAutoScaler, ElasticBlockDeviceMapping, ElasticBlockStore, ElasticBlockStoreGroup, ElasticIp, ElasticListener, ElasticLoadBalancer, ElasticTrigger, HealthCheck, RdsInstance, Revoke, SecurityGroup
Instance Attribute Summary
#init_opts, #name
Class Method Summary
collapse
Instance Method Summary
collapse
#after_initialized, #bootstrap_nodes!, #default_keypair_path, default_keypair_path, #method_missing, #run
Constructor Details
#initialize(name = cloud.proper_name, init_opts = {}, &block) ⇒ Ec2Helper
Returns a new instance of Ec2Helper.
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/cloud_providers/ec2/helpers/ec2_helper.rb', line 4
def initialize(name=cloud.proper_name, init_opts={}, &block)
@name = name
if name.is_a?(Hash)
@name = name[:name]
@init_opts = name if init_opts.empty?
else
@init_opts = init_opts
end
set_vars_from_options(init_opts)
instance_eval &block if block
after_initialized
end
|
Class Method Details
.property(*names) ⇒ Object
37
38
39
40
41
42
43
44
|
# File 'lib/cloud_providers/ec2/helpers/ec2_helper.rb', line 37
def self.property(*names)
names.each do |name|
define_method name do |*args|
instance_variable_set("@#{name}", args.first) unless args.empty?
instance_variable_get("@#{name}")
end
end
end
|
Instance Method Details
25
26
27
|
# File 'lib/cloud_providers/ec2/helpers/ec2_helper.rb', line 25
def as
cloud.as
end
|
21
22
23
|
# File 'lib/cloud_providers/ec2/helpers/ec2_helper.rb', line 21
def ec2
cloud.ec2
end
|
17
18
19
|
# File 'lib/cloud_providers/ec2/helpers/ec2_helper.rb', line 17
def elb
cloud.elb
end
|
33
34
35
|
# File 'lib/cloud_providers/ec2/helpers/ec2_helper.rb', line 33
def pool
cloud.parent
end
|
29
30
31
|
# File 'lib/cloud_providers/ec2/helpers/ec2_helper.rb', line 29
def rds
cloud.awsrds
end
|