class Template
Template
allows to render HTML from a given hash with documentation and theme.
Public Class Methods
new(path)
click to toggle source
# File lib/rdoc/generator/template_loader.rb, line 28 def initialize(path) @path = path end
Public Instance Methods
render(data)
click to toggle source
# File lib/rdoc/generator/template_loader.rb, line 32 def render(data) opts = { pretty: true } vars = RecursiveOpenStruct.new(data, recurse_over_arrays: true) template = Slim::Template.new(@path, opts) template.render(vars) end