Module: Lvr
- Defined in:
- lib/lvr.rb,
lib/lvr/refine.rb,
lib/lvr/version.rb,
lib/lvr/template.rb,
lib/lvr/refine/core.rb,
lib/lvr/template/tags.rb,
lib/lvr/template/filters.rb
Overview
This is free and unencumbered software released into the public domain.
Defined Under Namespace
Modules: Refine, VERSION Classes: Template
Class Method Summary collapse
-
.codegen(output_path, template_path, **context) ⇒ Object
Codegen an output file from a given template and context.
Class Method Details
.codegen(output_path, template_path, **context) ⇒ Object
Codegen an output file from a given template and context.
10 11 12 13 14 15 16 |
# File 'lib/lvr.rb', line 10 def self.codegen(output_path, template_path, **context) File.open(output_path.to_s, 'w') do |output_file| template = Template.load(template_path.to_s) output = template.render(**context) output_file.write(output) end end |