Object
A Grid represents the entire grid system of a Page and calculates the column width and row height of the base box.
:nodoc
# File lib/prawn/layout/grid.rb, line 39 def initialize(pdf, options = {}) valid_options = [:columns, :rows, :gutter, :row_gutter, :column_gutter] Prawn.verify_options valid_options, options @pdf = pdf @columns = options[:columns] @rows = options[:rows] set_gutter(options) end
Calculates the base width of boxes.
# File lib/prawn/layout/grid.rb, line 50 def column_width @column_width ||= subdivide(pdf.bounds.width, columns, column_gutter) end
Generated with the Darkfish Rdoc Generator 2.