class Malt::Format::Erb
Public Instance Methods
html(*data, &content)
click to toggle source
Technically method_missing
will pick this up, but since it is likely to be the most commonly used, adding the method directly will provide a small speed boost.
# File lib/malt/formats/erb.rb, line 17 def html(*data, &content) render_into(:html, *data, &content) end
to_html(*data, &yld)
click to toggle source
Technically method_missing
will pick this up, but since it is likely to be the most commonly used, adding the method directly will provide a small speed boost.
# File lib/malt/formats/erb.rb, line 24 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