Class: PdfTempura::Document::Table::BoxedCharacterColumn

Inherits:
Column
  • Object
show all
Defined in:
lib/pdf_tempura/document/table/boxed_character_column.rb

Instance Attribute Summary

Attributes inherited from Column

#height, #name, #options

Instance Method Summary collapse

Methods inherited from Column

#generates_field?

Constructor Details

#initialize(name, height, options = {}, &block) ⇒ BoxedCharacterColumn

Returns a new instance of BoxedCharacterColumn.



4
5
6
7
8
9
# File 'lib/pdf_tempura/document/table/boxed_character_column.rb', line 4

def initialize(name, height, options = {}, &block)
  @name = name
  @height = height
  @options = options
  @block = block if block_given?
end

Instance Method Details

#field_at(coordinates) ⇒ Object



15
16
17
# File 'lib/pdf_tempura/document/table/boxed_character_column.rb', line 15

def field_at(coordinates)
  PdfTempura::Document::BoxedCharacters.new(@name, coordinates, @height, @options, &@block)
end

#widthObject



11
12
13
# File 'lib/pdf_tempura/document/table/boxed_character_column.rb', line 11

def width
  field_at([0,0]).width
end