Class: KDirector::Dsls::Children::Blueprint
- Inherits:
-
KDirector::Directors::ChildDirector
- Object
- KDirector::Directors::BaseDirector
- KDirector::Directors::ChildDirector
- KDirector::Dsls::Children::Blueprint
- Defined in:
- lib/k_director/dsls/children/blueprint.rb
Overview
Blueprint DSL is used to add files to the target folder.
A blueprint is a recipe that you can follow to build out assets on the target application
Instance Attribute Summary
Attributes inherited from KDirector::Directors::ChildDirector
Attributes inherited from KDirector::Directors::BaseDirector
#builder, #k_builder, #options
Instance Method Summary collapse
-
#run_template_script(template_file, **opts) ⇒ Object
file = k_builder.find_template_file(template_file) File.read(file) end.
Methods inherited from KDirector::Directors::ChildDirector
Methods inherited from KDirector::Directors::BaseDirector
#active?, #add, #add_clipboard, #add_file, #blueprint, builder_type, #configuration, #data, #debug, #debug_dom, #debug_options, default_builder_type, default_on_action, default_on_exist, defaults, #director_name, #director_name=, #dom, #fadd, #github, #inherited_opts, init, #initialize, #json_dom, #oadd, #on_action, on_action, #on_exist, on_exist, #package_json, #play_actions, #run_command, #run_script, #set_current_folder_action, #settings, #tadd, #template_base_folder, #typed_dom
Constructor Details
This class inherits a constructor from KDirector::Directors::ChildDirector
Instance Method Details
#run_template_script(template_file, **opts) ⇒ Object
file = k_builder.find_template_file(template_file)
File.read(file)
end
18 19 20 21 22 23 24 25 |
# File 'lib/k_director/dsls/children/blueprint.rb', line 18 def run_template_script(template_file, **opts) template_parts = [template_base_folder, opts[:template_subfolder], template_file].reject(&:blank?) template_path = File.join(*template_parts) script = k_builder.process_any_content(template_file: template_path, **opts) run_script(script) end |