Class: Lono::Template::Dsl
- Defined in:
- lib/lono/template/dsl.rb,
lib/lono/template/dsl/builder.rb
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
- #build_template(path) ⇒ Object
-
#initialize(blueprint, options = {}) ⇒ Dsl
constructor
A new instance of Dsl.
- #run ⇒ Object
Methods included from Blueprint::Root
#bundler_groups, #find_blueprint_root, #require_bundle_gems, #set_blueprint_root
Constructor Details
#initialize(blueprint, options = {}) ⇒ Dsl
Returns a new instance of Dsl.
4 5 6 |
# File 'lib/lono/template/dsl.rb', line 4 def initialize(blueprint, ={}) super end |
Instance Attribute Details
#results ⇒ Object (readonly)
Returns the value of attribute results.
3 4 5 |
# File 'lib/lono/template/dsl.rb', line 3 def results @results end |
Instance Method Details
#build_template(path) ⇒ Object
16 17 18 19 |
# File 'lib/lono/template/dsl.rb', line 16 def build_template(path) builder = Builder.new(path, @blueprint, @options) builder.build end |
#run ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/lono/template/dsl.rb', line 8 def run puts "Generating CloudFormation templates for blueprint #{@blueprint.color(:green)}:" unless @options[:quiet] paths = Dir.glob("#{Lono.config.templates_path}/**/*.rb") paths.select{ |e| File.file?(e) }.each do |path| build_template(path) end end |