Class: PDF::SimpleTable::Column
- Defined in:
- lib/extensions/pdf-writer/pdf/simpletable.rb
Overview
Defines formatting options for a column.
Defined Under Namespace
Classes: Heading
Instance Attribute Summary collapse
-
#heading ⇒ Object
The heading of the column.
-
#justification ⇒ Object
The justification of the column.
-
#link_name ⇒ Object
The data name that will be used to provide a hyperlink for values in this column.
-
#name ⇒ Object
readonly
The name of the column.
-
#width ⇒ Object
The width of the column.
Instance Method Summary collapse
-
#initialize(name) {|_self| ... } ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(name) {|_self| ... } ⇒ Column
Returns a new instance of Column.
22 23 24 25 26 |
# File 'lib/extensions/pdf-writer/pdf/simpletable.rb', line 22 def initialize(name) @name = name yield self if block_given? end |
Instance Attribute Details
#heading ⇒ Object
The heading of the column. This should be an instance of PDF::SimpleTable::Column::Heading. If it is not, it will be converted into one.
31 32 33 |
# File 'lib/extensions/pdf-writer/pdf/simpletable.rb', line 31 def heading @heading end |
#justification ⇒ Object
The justification of the column. May be :left, :right, :center, or :full.
48 49 50 |
# File 'lib/extensions/pdf-writer/pdf/simpletable.rb', line 48 def justification @justification end |
#link_name ⇒ Object
The data name that will be used to provide a hyperlink for values in this column.
45 46 47 |
# File 'lib/extensions/pdf-writer/pdf/simpletable.rb', line 45 def link_name @link_name end |
#name ⇒ Object (readonly)
The name of the column.
39 40 41 |
# File 'lib/extensions/pdf-writer/pdf/simpletable.rb', line 39 def name @name end |
#width ⇒ Object
The width of the column. If this value is set, the column will be exactly this number of units wide.
42 43 44 |
# File 'lib/extensions/pdf-writer/pdf/simpletable.rb', line 42 def width @width end |