Class: Taxedo::Builder::Html

Inherits:
Base
  • Object
show all
Defined in:
lib/taxedo/builder/html.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #price, #subtotal, #t, #taxes, #total

Constructor Details

This class inherits a constructor from Taxedo::Builder::Base

Instance Method Details

#generate(template, options = {}) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/taxedo/builder/html.rb', line 2

def generate(template, options={})
  case template
    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