lib/nasldoc/cli/application.rb
# Compiles a template for each file
Compiles a template for each file
Compiles a template for each file
def build_template name, path=nil
				path ||= name
				dest = url(path)
				puts "[**] Creating #{dest}"
				@erb = ERB.new File.new("#{@template_dir}/#{name}.erb").read, nil, "%"
				html = @erb.result(get_binding)
				File.open("#{@options[:output_directory]}/#{dest}", 'w+') do |f|
					f.puts html
				end
			end
def build_template name , path = nil path ||= name dest = url ( path ) puts "[**] Creating #{dest}" @erb = ERB . new File . new ( "#{@template_dir}/#{name}.erb" ) . read , nil , "%" html = @erb . result ( get_binding ) File . open ( "#{@options[:output_directory]}/#{dest}" , 'w+' ) do | f | f . puts html end end
Compiles a template for each file
Compiles a template for each file
name
<not_specific>
path
<not_specific>