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.
27 28 29 30 31 |
# File 'lib/pdf/simpletable.rb', line 27 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.
36 37 38 |
# File 'lib/pdf/simpletable.rb', line 36 def heading @heading end |
#justification ⇒ Object
The justification of the column. May be :left, :right, :center, or :full.
53 54 55 |
# File 'lib/pdf/simpletable.rb', line 53 def justification @justification end |
#link_name ⇒ Object
The data name that will be used to provide a hyperlink for values in this column.
50 51 52 |
# File 'lib/pdf/simpletable.rb', line 50 def link_name @link_name end |
#name ⇒ Object (readonly)
The name of the column.
44 45 46 |
# File 'lib/pdf/simpletable.rb', line 44 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.
47 48 49 |
# File 'lib/pdf/simpletable.rb', line 47 def width @width end |