Class: VagrantPlugins::AwsAlbTargetGroup::Action::Base
- Inherits:
-
Object
- Object
- VagrantPlugins::AwsAlbTargetGroup::Action::Base
- Defined in:
- lib/vagrant-aws-alb-target-group/action/base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call(env) {|@machine.id, @machine.config.aws_alb.target_group_name| ... } ⇒ Object
-
#initialize(app, env) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(app, env) ⇒ Base
Returns a new instance of Base.
9 10 11 12 |
# File 'lib/vagrant-aws-alb-target-group/action/base.rb', line 9 def initialize(app, env) @app = app @machine = env[:machine] end |
Instance Method Details
#call(env) {|@machine.id, @machine.config.aws_alb.target_group_name| ... } ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/vagrant-aws-alb-target-group/action/base.rb', line 14 def call(env) return @app.call(env) if @machine.config.aws_alb.target_group_name.nil? @aws = AwsAlbTargetGroup::Util::AwsUtil.new(@machine.provider_config.access_key_id, @machine.provider_config.secret_access_key, @machine.provider_config.region) yield @machine.id, @machine.config.aws_alb.target_group_name if block_given? @app.call(env) end |