class Taxedo::Builder::Html < Taxedo::Builder::Base def generate(format, options={}) case format when :lines then lines when :rows then table_rows options[:columns], options[:custom_content] else table end @content = @content.join("\n") @content = @content.html_safe if @content.respond_to? :html_safe return @content end private def lines line t('subtotal'), subtotal, :class => 'subtotal' taxes.each { |tax| line tax.name, tax.amount, :class => "tax #{tax.id}" } line t('total'), total, :class => 'total' end def line(label, value, options={}) options = { :class => '' }.merge(options) @content << ('
') end def table @content << '