class Malt::Format::Tenjin

Tenjin

http://www.kuwata-lab.com/tenjin/

Public Instance Methods

html(*data, &content) click to toggle source
# File lib/malt/formats/tenjin.rb, line 28
def html(*data, &content)
  render_into(:html, *data, &content)
end
rb(*) click to toggle source
# File lib/malt/formats/tenjin.rb, line 15
def rb(*)
  render_engine.compile(text, file)
end
to_html(*data, &yld) click to toggle source
# File lib/malt/formats/tenjin.rb, line 33
def to_html(*data, &yld)
  new_text    = render(:html, *data, &yld)
  new_file    = refile(:html)
  new_options = options.merge(:text=>new_text, :file=>new_file, :type=>:html)
  HTML.new(new_options)
end
to_rb(*) click to toggle source

Erb templates can be “precompiled” into Ruby templates.

# File lib/malt/formats/tenjin.rb, line 20
def to_rb(*)
  text = rb
  Ruby.new(:text=>text, :file=>refile(:rb), :type=>:rb)
end
Also aliased as: to_ruby
to_ruby(*)
Alias for: to_rb

Private Instance Methods

render_engine() click to toggle source
# File lib/malt/formats/tenjin.rb, line 43
def render_engine
  @render_engine ||= Malt::Engine::Tenjin.new(options)
end