Sha256: 757b8d134326557cdbe8cd1efd3c73917bd5aaba42c4131957e6683f24ebcea6
Contents?: true
Size: 434 Bytes
Versions: 4
Compression:
Stored size: 434 Bytes
Contents
require 'active_support/inflector' module Resulang module Rendering include ActiveSupport::Inflector def render_section(section) if s = sections[section.to_sym] ERB.new(File.read(partial(section))).result(s.get_binding) end end def html_escape(str) ERB::Util.html_escape(str) end def partial(name) File.expand_path("../_#{name}.html.erb", template_path) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
resulang-3.0.0 | lib/resulang/rendering.rb |
resulang-2.0.0 | lib/resulang/rendering.rb |
resulang-1.0.0 | lib/resulang/rendering.rb |
resulang-0.0.1 | lib/resulang/rendering.rb |