Class: Lono::Template::Context
- Inherits:
-
AbstractBase
- Object
- AbstractBase
- Lono::Template::Context
- Extended by:
- Memoist
- Includes:
- Helpers, Loader, Helper, Strategy::Dsl::Builder::Syntax
- Defined in:
- lib/lono/template/context.rb,
lib/lono/template/context/loader.rb,
lib/lono/template/context/helpers.rb,
lib/lono/template/context/ssm_fetcher.rb
Defined Under Namespace
Modules: Helpers, Loader Classes: SsmFetcher
Constant Summary
Constants included from Strategy::Dsl::Builder::Fn
Strategy::Dsl::Builder::Fn::FUNCTIONS
Instance Method Summary collapse
-
#get_binding ⇒ Object
For Lono::AppFile::Build usage of Thor::Action directory For some reason a send(:binding) doesnt work but get_binding like this works.
-
#initialize(options = {}) ⇒ Context
constructor
A new instance of Context.
-
#instance_variables!(variables) ⇒ Object
Take a hash and makes them instance variables in the current scope.
Methods included from Strategy::Dsl::Builder::Helpers::TagsHelper
Methods included from Strategy::Dsl::Builder::Helpers::S3Helper
Methods included from Strategy::Dsl::Builder::Helpers::LookupHelper
Methods included from AwsServices
#cfn, #ec2, #iam, #s3, #s3_presigner, #s3_resource, #sts
Methods included from AwsServices::Helper
#rollback_complete?, #testing_update?
Methods included from AwsServices::StackSet
#find_stack_set, #stack_set_exists?
Methods included from AwsServices::Stack
Methods included from Strategy::Dsl::Builder::Helpers::FileHelper
#content, #render_file, #render_path, #user_data, #user_data_script
Methods included from Strategy::Dsl::Builder::Helpers::CoreHelper
Methods included from Strategy::Dsl::Builder::Section::Extensions
Methods included from Strategy::Dsl::Builder::Section::Methods
#aws_template_format_version, #condition, #description, #mapping, #metadata, #output, #parameter, #resource, #section, #transform
Methods included from Evaluate
#evaluate_template_path, #template_evaluation_error
Methods included from Strategy::Dsl::Builder::Fn
#conditional_ref, define_methods, #fn, #fn_id, #get_att, #get_azs, included, #join, #ref, #sub
Methods included from Helpers
Methods included from Helper
#current_region, #extract_scripts, #indent, #partial, #partial_exist?, #scripts_name, #scripts_s3_path, #template_params, #template_s3_path, #user_data
Methods inherited from AbstractBase
Methods included from Blueprint::Root
#find_blueprint_root, #set_blueprint_root
Constructor Details
#initialize(options = {}) ⇒ Context
Returns a new instance of Context.
10 11 12 13 14 |
# File 'lib/lono/template/context.rb', line 10 def initialize(={}) super load_variables load_project_helpers end |
Instance Method Details
#get_binding ⇒ Object
For Lono::AppFile::Build usage of Thor::Action directory For some reason a send(:binding) doesnt work but get_binding like this works.
26 27 28 |
# File 'lib/lono/template/context.rb', line 26 def get_binding binding end |
#instance_variables!(variables) ⇒ Object
Take a hash and makes them instance variables in the current scope. Use this in custom helper methods to make variables accessible to ERB templates.
18 19 20 21 22 |
# File 'lib/lono/template/context.rb', line 18 def instance_variables!(variables) variables.each do |key, value| instance_variable_set('@' + key.to_s, value) end end |