lib/prawn/grid.rb in prawn-1.2.1 vs lib/prawn/grid.rb in prawn-1.3.0
- old
+ new
@@ -26,11 +26,11 @@
# A method that can either be used to access a particular grid on the page
# or work with the grid system directly.
#
# @pdf.grid # Get the Grid directly
- # @pdf.grid([0,1]) # Get the box at [0,1]
+ # @pdf.grid([0,1]) # Get the GridBox at [0,1]
# @pdf.grid([0,1], [1,2]) # Get a multi-box spanning from [0,1] to [1,2]
#
def grid(*args)
@boxes ||= {}
@boxes[args] ||= if args.empty?
@@ -47,11 +47,11 @@
end
# A Grid represents the entire grid system of a Page and calculates
# the column width and row height of the base box.
#
- # @private
+ # @group Experimental API
class Grid
attr_reader :pdf, :columns, :rows, :gutter, :row_gutter, :column_gutter
def initialize(pdf, options = {}) # :nodoc:
valid_options = [:columns, :rows, :gutter, :row_gutter, :column_gutter]
Prawn.verify_options valid_options, options
@@ -101,11 +101,11 @@
# A Box is a class that represents a bounded area of a page.
# A Grid object has methods that allow easy access to the coordinates of
# its corners, which can be plugged into most existing prawnmethods.
#
- # @private
+ # @group Experimental API
class GridBox
attr_reader :pdf
def initialize(pdf, i, j)
@pdf = pdf
@@ -204,11 +204,11 @@
end
end
# A MultiBox is specified by 2 Boxes and spans the areas between.
#
- # @private
- class MultiBox < GridBox #:nodoc:
+ # @group Experimental API
+ class MultiBox < GridBox
def initialize(pdf, b1, b2)
@pdf = pdf
@bs = [b1, b2]
end