Parent

Methods

Files

Prawn::Document::LazyBoundingBox

Public Instance Methods

action(&block) click to toggle source

Defines the block to be executed by LazyBoundingBox#draw. Usually, this will be used via a higher level interface. See the documentation for Document#lazy_bounding_box, Document#header, and Document#footer

    # File lib/prawn/layout/page.rb, line 57
57:       def action(&block)
58:         @action = block
59:       end
draw() click to toggle source

Sets Document#bounds to use the LazyBoundingBox for its bounds, runs the block specified by LazyBoundingBox#action, and then restores the original bounds of the document.

    # File lib/prawn/layout/page.rb, line 65
65:       def draw
66:         @parent.mask(:y) do  
67:           parent_box = @parent.bounds  
68:           @parent.bounds = self    
69:           @parent.y = absolute_top
70:           @action.call   
71:           @parent.bounds = parent_box
72:         end
73:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.