Method: PDF::SimpleTable#initialize

Defined in:
lib/pdf/simpletable.rb

#initialize {|_self| ... } ⇒ SimpleTable

Returns a new instance of SimpleTable.

Yields:

  • (_self)

Yield Parameters:



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/pdf/simpletable.rb', line 69

def initialize
  @column_order = []
  @data         = []
  @columns      = {}

  @show_lines           = :outer
  @show_headings        = true
  @shade_rows           = :shaded
  @shade_color          = Color::RGB::Grey80
  @shade_color2         = Color::RGB::Grey70
  @shade_headings       = false
  @shade_heading_color  = Color::RGB::Grey90
  @font_size            = 10
  @heading_font_size    = 12
  @title_font_size      = 12
  @title_gap            = 5
  @title_color          = Color::RGB::Black
  @heading_color        = Color::RGB::Black
  @text_color           = Color::RGB::Black
  @line_color           = Color::RGB::Black
  @position             = :center
  @orientation          = :center
  @bold_headings        = false

  @cols                 = PDF::Writer::OHash.new
  @width                = 0
  @maximum_width        = 0

  @gap                  = 5
  @row_gap              = 2
  @column_gap           = 5
  @header_gap           = 0

  @minimum_space        = 0
  @protect_rows         = 1
  @split_rows           = false

  @inner_line_style     = PDF::Writer::StrokeStyle.new(1)
  @outer_line_style     = PDF::Writer::StrokeStyle.new(1)

  yield self if block_given?
end