Class: PDF::SimpleTable::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/pdf/simpletable.rb

Overview

Defines formatting options for a column.

Defined Under Namespace

Classes: Heading

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) {|_self| ... } ⇒ Column

Returns a new instance of Column.

Yields:

  • (_self)

Yield Parameters:



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

#headingObject

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

#justificationObject

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

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

#nameObject (readonly)

The name of the column.



40
41
42
# File 'lib/pdf/simpletable.rb', line 40

def name
  @name
end

#widthObject

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