Class: EcsDeployCli::DSL::Service::LoadBalancer

Inherits:
Object
  • Object
show all
Includes:
AutoOptions
Defined in:
lib/ecs_deploy_cli/dsl/service.rb

Instance Method Summary collapse

Methods included from AutoOptions

#_options, #method_missing

Constructor Details

#initialize(name, config) ⇒ LoadBalancer

Returns a new instance of LoadBalancer.



43
44
45
46
# File 'lib/ecs_deploy_cli/dsl/service.rb', line 43

def initialize(name, config)
  _options[:load_balancer_name] = name
  @config = config
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class EcsDeployCli::DSL::AutoOptions

Instance Method Details

#as_definitionObject



53
54
55
# File 'lib/ecs_deploy_cli/dsl/service.rb', line 53

def as_definition
  _options
end

#target_group_arn(value) ⇒ Object



48
49
50
51
# File 'lib/ecs_deploy_cli/dsl/service.rb', line 48

def target_group_arn(value)
  _options[:target_group_arn] = "arn:aws:elasticloadbalancing:#{@config[:aws_region]}:#{@config[:aws_profile_id]}:targetgroup/#{value}"
  _options.delete(:load_balancer_name)
end