Malt  Malt::Format::RBHTML

[Validate]
Generated with RDazzle Newfish 1.4.0

RBHTML

RBHTML is a variant of Tenjin, but limited to HTML conversion.

Public Instance Methods

html(data=nil, &yld) click to toggle source
    # File lib/malt/formats/rbhtml.rb, line 31
31:     def html(data=nil, &yld)
32:       render_engine.render(:text=>text, :file=>file, :data=>data, :format=>:html, &yld)
33:     end
precompile(*) click to toggle source
rb(*) click to toggle source

RHTML templates can be “pre-compiled” into Ruby templates.

    # File lib/malt/formats/rbhtml.rb, line 14
14:     def rb(*)
15:       render_engine.compile(:text=>text, :file=>file)
16:     end
to_html(data=nil, &yld) click to toggle source
    # File lib/malt/formats/rbhtml.rb, line 36
36:     def to_html(data=nil, &yld)
37:       text = html(data, &yld)
38:       opts = options.merge(:text=>text, :file=>refile(:html), :type=>:html)
39:       HTML.new(opts)
40:     end
to_rb(*) click to toggle source

RHTML templates can be “pre-compiled” into Ruby templates.

    # File lib/malt/formats/rbhtml.rb, line 19
19:     def to_rb(*)
20:       text = rb
21:       Ruby.new(:text=>text, :file=>refile(:rb), :type=>:rb)
22:     end
Also aliased as: to_ruby, precompile
to_ruby(*) click to toggle source

Private Instance Methods

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

Disabled; run with --debug to generate this.