Class: Aws::AutoScaling::Group
Instance Method Summary
collapse
#tag_hash
Constructor Details
#initialize(name, options = {}) ⇒ Group
Returns a new instance of Group.
8
9
10
11
12
13
14
15
16
|
# File 'lib/aws-sdk/enhanced/auto_scaling.rb', line 8
def initialize(name, options = {})
options = {
client: Aws::AutoScaling::Client.new
}.merge(options)
@client = options[:client]
response = @client.describe_auto_scaling_groups(auto_scaling_group_names: [ name ])
@group = response.auto_scaling_groups.first
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
26
27
28
29
30
31
32
|
# File 'lib/aws-sdk/enhanced/auto_scaling.rb', line 26
def method_missing(sym, *args, &block)
if has_method?(sym)
@group.send(sym, *args, &block)
else
super(sym, *args, &block)
end
end
|
Instance Method Details
#exists? ⇒ Boolean
18
19
20
|
# File 'lib/aws-sdk/enhanced/auto_scaling.rb', line 18
def exists?
!@group.nil?
end
|
#respond_to?(sym, include_all = false) ⇒ Boolean
22
23
24
|
# File 'lib/aws-sdk/enhanced/auto_scaling.rb', line 22
def respond_to?(sym, include_all = false)
has_method?(sym) || super(sym, include_all)
end
|