Module: Applb::TemplateHelper
- Included in:
- DSL, DSL::EC2, DSL::EC2::LoadBalancer, DSL::EC2::LoadBalancer::Attributes, DSL::EC2::LoadBalancer::Listeners, DSL::EC2::LoadBalancer::Listeners::Listener, DSL::EC2::LoadBalancer::TargetGroups, DSL::EC2::LoadBalancer::TargetGroups::TargetGroup
- Defined in:
- lib/applb/template_helper.rb
Instance Method Summary collapse
Instance Method Details
#context ⇒ Object
16 17 18 |
# File 'lib/applb/template_helper.rb', line 16 def context @context end |
#include_template(template_name, context = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/applb/template_helper.rb', line 3 def include_template(template_name, context = {}) template = @context.templates[template_name.to_s] unless template raise "Template `#{template_name}' is not defined" end context_org = @context @context = @context.merge(context) instance_eval(&template) @context = context_org end |