lib/prawn/text/box.rb in prawn-2.0.1 vs lib/prawn/text/box.rb in prawn-2.0.2

- old
+ new

@@ -99,11 +99,11 @@ # == Exceptions # # Raises <tt>Prawn::Errors::CannotFit</tt> if not wide enough to print # any text # - def text_box(string, options={}) + def text_box(string, options = {}) options = options.dup options[:document] = self box = if p = options.delete(:inline_format) p = [] unless p.is_a?(Array) @@ -123,19 +123,16 @@ # #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 # class Box < Prawn::Text::Formatted::Box - - def initialize(string, options={}) + def initialize(string, options = {}) super([{ :text => string }], options) end - def render(flags={}) + def render(flags = {}) leftover = super(flags) leftover.collect { |hash| hash[:text] }.join end - end - end end