class RgGen::Core::OutputBase::TemplateEngine
Public Instance Methods
process_template(context, path = nil, caller_location = nil)
click to toggle source
# File lib/rggen/core/output_base/template_engine.rb, line 9 def process_template(context, path = nil, caller_location = nil) unless path caller_location ||= caller_locations(1, 1).first path = File.ext(caller_location.path, file_extension.to_s) end render(context, template(path)) end
Private Instance Methods
template(path)
click to toggle source
# File lib/rggen/core/output_base/template_engine.rb, line 19 def template(path) @templates ||= {} (@templates[path] ||= parse_template(path)) end