Class: Malt::Format::RBHTML

Inherits:
Abstract show all
Defined in:
lib/malt/formats/rbhtml.rb

Overview

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

Instance Attribute Summary

Attributes inherited from Abstract

#options

Instance Method Summary collapse

Methods inherited from Abstract

#default, #engine, engine, extensions, #extensions, #file, file_extension, #file_read, #file_type, #parse_type_from_data, #refile, register, #render, #render_into, #rendering_parameters, #scope_vs_data, #subtype, #text, #to, #to_default, #to_s, #type, #with, #with!

Instance Method Details

#html(*data, &content) ⇒ Object


14
15
16
# File 'lib/malt/formats/rbhtml.rb', line 14

def html(*data, &content)
  render_into(:html, *data, &content)
end

#to_html(*data, &yld) ⇒ Object


19
20
21
22
23
24
25
26
27
28
# File 'lib/malt/formats/rbhtml.rb', line 19

def to_html(*data, &yld)
  text = html(*data, &yld)
  opts = options.merge(
    :text   => text,
    :file   => refile(:html),
    :type   => :html,
    :engine => nil
  )
  HTML.new(opts)
end