vendor/gems/prawn-0.3.0/lib/prawn/document/bounding_box.rb
# A LazyBoundingBox is simply a BoundingBox with an action tied to it to be 
# executed later.  The lazy_bounding_box method takes the same arguments as
# bounding_box, but returns a LazyBoundingBox object instead of executing
# the code block directly.
#
# You can then call LazyBoundingBox#draw at any time (or multiple times if 
# you wish), and the contents of the block will then be run. This can be
# useful for assembling repeating page elements or reusable components.
#
#  file = "lazy_bounding_boxes.pdf"
#  Prawn::Document.generate(file, :skip_page_creation => true) do                    
#    point = [bounds.right-50, bounds.bottom + 25]
#    page_counter = lazy_bounding_box(point, :width => 50) do   
#      text "Page: #{page_count}"
#    end 
#
#    10.times do         
#     start_new_page
#      text "Some text"  
#      page_counter.draw
#    end
#  end
#
A LazyBoundingBox is simply a BoundingBox with an action tied to it to be
executed later.  The lazy_bounding_box method takes the same arguments as
bounding_box, but returns a LazyBoundingBox object instead of executing
the code block directly.

You can then call LazyBoundingBox#draw at any time (or multiple times if
you wish), and the contents of the block will then be run. This can be
useful for assembling repeating page elements or reusable components.




A LazyBoundingBox is simply a BoundingBox with an action tied to it to be executed later . The lazy_bounding_box method takes the same arguments as bounding_box but returns a LazyBoundingBox object instead of executing the code block directly . You can then call LazyBoundingBox#draw at any time ( or multiple times if you wish ) and the contents of the block will then be run . This can be useful for assembling repeating page elements or reusable components .
def lazy_bounding_box(*args,&block)
      translate!(args[0])  
      box = LazyBoundingBox.new(self,*args)
      box.action(&block)
      return box 
    end
def lazy_bounding_box ( * args , & block ) translate! ( args [ 0 ] ) box = LazyBoundingBox . new ( self , * args ) box . action ( & block ) return box end
A LazyBoundingBox is simply a BoundingBox with an action tied to it to be
executed later.
A LazyBoundingBox is simply a BoundingBox with an action tied to it to be executed later .
args
<not_specific>
block
<not_specific>