module Resulang::Rendering

Public Instance Methods

html_escape(str) click to toggle source
# File lib/resulang/rendering.rb, line 13
def html_escape(str)
  ERB::Util.html_escape(str)
end
partial(name) click to toggle source
# File lib/resulang/rendering.rb, line 17
def partial(name)
  File.expand_path("../_#{name}.html.erb", template_path)
end
render_section(section) click to toggle source
# File lib/resulang/rendering.rb, line 7
def render_section(section)
  if s = sections[section.to_sym]
    ERB.new(File.read(partial(section))).result(s.get_binding)
  end
end