Class: PDF::SimpleTable::Column
- Inherits:
-
Object
- Object
- PDF::SimpleTable::Column
- Defined in:
- lib/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.
23 24 25 26 27 |
# File 'lib/pdf/simpletable.rb', line 23 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.
32 33 34 |
# File 'lib/pdf/simpletable.rb', line 32 def heading @heading end |
#justification ⇒ Object
The justification of the column. May be :left, :right, :center, or :full.
49 50 51 |
# File 'lib/pdf/simpletable.rb', line 49 def justification @justification end |
#link_name ⇒ Object
The data name that will be used to provide a hyperlink for values in this column.
46 47 48 |
# File 'lib/pdf/simpletable.rb', line 46 def link_name @link_name end |
#name ⇒ Object (readonly)
The name of the column.
40 41 42 |
# File 'lib/pdf/simpletable.rb', line 40 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.
43 44 45 |
# File 'lib/pdf/simpletable.rb', line 43 def width @width end |