Methods

Prawn::Text::Box

Generally, one would use the Prawn::Text#text_box convenience method. However, using Text::Box.new in conjunction with #(:dry_run=> true) enables one to do look-ahead calculations prior to placing text on the page, or to determine how much vertical space was consumed by the printed text

Public Class Methods

new(string, options={}) click to toggle source
     # File lib/prawn/text/box.rb, line 119
119:       def initialize(string, options={})
120:         super([{ :text => string }], options)
121:       end

Public Instance Methods

render(flags={}) click to toggle source
     # File lib/prawn/text/box.rb, line 123
123:       def render(flags={})
124:         leftover = super(flags)
125:         leftover.collect { |hash| hash[:text] }.join
126:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.