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::Common::Helpers
#extract_scripts, #scripts_name, #scripts_s3_path, #setting
Methods included from Strategy::Dsl::Builder::Syntax::ExtendWith
Methods included from Strategy::Dsl::Builder::Syntax::ParameterGroup
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 Loader::LoadFiles
Methods included from Helper
#current_region, #indent, #partial, #partial_exist?, #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 |
# File 'lib/lono/template/context.rb', line 10 def initialize(={}) super load_context 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.
25 26 27 |
# File 'lib/lono/template/context.rb', line 25 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.
17 18 19 20 21 |
# File 'lib/lono/template/context.rb', line 17 def instance_variables!(variables) variables.each do |key, value| instance_variable_set('@' + key.to_s, value) end end |