Method: Docgen::CLI.run_template

Defined in:
lib/docgen/cli.rb

.run_template(template_name, bind) ⇒ Object

run_template( template_name, bind )

template_name - The name of the template file bind - The binding to pass to the template

This runs the specified template with the bindings and returns the text output.



87
88
89
90
91
92
# File 'lib/docgen/cli.rb', line 87

def self.run_template( template_name, bind )

  erb = ERB.new( File.new( File.dirname(__FILE__)+"/../../templates/docgen/#{template_name}" ).read )
  erb.result( bind )

end