class Mako::HTMLRenderer
Attributes
bound[R]
feed_template[R]
template[R]
Public Class Methods
new(args)
click to toggle source
# File lib/mako/html_renderer.rb, line 9 def initialize(args) @template = args.fetch(:template, File.expand_path(File.join('themes', "#{Mako.config.theme}.html.erb"), Dir.pwd)) @bound = args.fetch(:bound) @feed_template = File.expand_path('layouts/_feed_container.html.erb', __dir__) end
Public Instance Methods
file_path()
click to toggle source
Default file name for rendererd file.
@return [String]
# File lib/mako/html_renderer.rb, line 26 def file_path 'index.html' end
render()
click to toggle source
Wrapper for ERB renderer. Creates new ERB instance with view template and renders it with binding from core.
@return [String]
# File lib/mako/html_renderer.rb, line 19 def render ERB.new(load_resource(template)).result(bound.get_binding) end