Sha256: 2b392474db6d442819560e96787274242cd4f555ae9377bf1edd0973bacd220a
Contents?: true
Size: 824 Bytes
Versions: 1
Compression:
Stored size: 824 Bytes
Contents
require 'malt/formats/abstract' require 'malt/formats/html' require 'malt/engines/rtals' module Malt::Format # class Rtals < Abstract register('rtal') # def html(data, &yld) render_engine.render(:text=>text, :data=>data, &yld) end # def to_html(data, &yld) text = html(data, &yld) opts = options.merge(:text=>text, :file=>refile(:html), :type=>:html) HTML.new(opts) end # def xml(data, &yld) render_engine.render(:text=>text, :data=>data, &yld) end # def to_xml(data, &yld) text = xml(data, &yld) opts = options.merge(:text=>text, :file=>refile(:xml), :type=>:xml) HTML.new(opts) end private # def render_engine @render_engine ||= Malt::Engine::RTALS.new(options) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
malt-0.1.1 | lib/malt/formats/rtals.rb |