Generally, one would use the Prawn::Text#text_box convenience method. However, using ::new in conjunction with render(: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
# File lib/prawn/text/box.rb, line 128 def initialize(string, options={}) super([{ :text => string }], options) end
# File lib/prawn/text/box.rb, line 132 def render(flags={}) leftover = super(flags) leftover.collect { |hash| hash[:text] }.join end