Prawn::Document::ColumnBox

Implements the necessary functionality to allow Document#column_box to work.

Public Instance Methods

left_side() click to toggle source

x coordinate of the left edge of the current column

    # File lib/prawn/document/column_box.rb, line 91
91:       def left_side
92:         absolute_left + (width_of_column * @current_column)
93:       end
move_past_bottom() click to toggle source

Moves to the next column or starts a new page if currently positioned at the rightmost column.

     # File lib/prawn/document/column_box.rb, line 104
104:       def move_past_bottom 
105:         @current_column = (@current_column + 1) % @columns
106:         @parent.y = @y
107:         if 0 == @current_column
108:           @parent.start_new_page
109:         end
110:       end
right_side() click to toggle source

x co-orordinate of the right edge of the current column

     # File lib/prawn/document/column_box.rb, line 97
 97:       def right_side
 98:         columns_from_right = @columns - (1 + @current_column)
 99:         absolute_right - (width_of_column * columns_from_right)
100:       end
width() click to toggle source

The column width, not the width of the whole box. Used to calculate how long a line of text can be.

    # File lib/prawn/document/column_box.rb, line 79
79:       def width
80:         super / @columns - @spacer
81:       end
width_of_column() click to toggle source

Column width including the spacer.

    # File lib/prawn/document/column_box.rb, line 85
85:       def width_of_column
86:         width + @spacer
87:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.