Class: Lono::Template::Strategy::Dsl

Inherits:
Base show all
Defined in:
lib/lono/template/strategy/dsl.rb,
lib/lono/template/strategy/dsl/builder.rb,
lib/lono/template/strategy/dsl/finalizer.rb

Defined Under Namespace

Classes: Builder, Finalizer

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractBase

#reinitialize, #template_path

Methods included from Blueprint::Root

#find_blueprint_root, #set_blueprint_root

Constructor Details

#initialize(options = {}) ⇒ Dsl

Returns a new instance of Dsl.



4
5
6
# File 'lib/lono/template/strategy/dsl.rb', line 4

def initialize(options={})
  super
end

Instance Attribute Details

#resultsObject (readonly)

Returns the value of attribute results.



3
4
5
# File 'lib/lono/template/strategy/dsl.rb', line 3

def results
  @results
end

Instance Method Details

#build_template(path) ⇒ Object



14
15
16
17
# File 'lib/lono/template/strategy/dsl.rb', line 14

def build_template(path)
  builder = Builder.new(path, @blueprint, @options)
  builder.build
end

#runObject



8
9
10
11
12
# File 'lib/lono/template/strategy/dsl.rb', line 8

def run
  puts "Generating CloudFormation templates for blueprint #{@blueprint.color(:green)}:" unless @options[:quiet]
  template_path = "#{Lono.config.templates_path}/#{@template}.rb"
  build_template(template_path)
end