Class: Lono::Inspector::Base
Instance Method Summary
collapse
#initialize, #reinitialize, #template_path
#find_blueprint_root, #set_blueprint_root
Instance Method Details
#all_templates ⇒ Object
25
26
27
28
29
30
|
# File 'lib/lono/inspector/base.rb', line 25
def all_templates
templates_path = "#{Lono.config.output_path}/#{@blueprint}/templates"
Dir.glob("#{templates_path}/**").map do |path|
path.sub("#{templates_path}/", '').sub('.yml','') end
end
|
#generate ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/lono/inspector/base.rb', line 13
def generate
if @options[:source]
Lono::Cfn::Download.new(@options).run
else
generate_templates
end
end
|
#generate_templates ⇒ Object
21
22
23
|
# File 'lib/lono/inspector/base.rb', line 21
def generate_templates
Lono::Template::Generator.new(@options.merge(quiet: false)).run
end
|
#run ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/lono/inspector/base.rb', line 5
def run
generate
templates = @template_name ? [@template_name] : all_templates
templates.each do |template_name|
perform(template_name)
end
end
|