vendor/bundle/ruby/1.8/gems/cucumber-1.1.9/lib/cucumber/formatter/pdf.rb
# This method does a 'test' rendering on a blank page, to see the rendered height of the buffer
# if that too high for the space left on the age in the real document, we do a page break.
# This obviously doesn't work if a scenario is longer than a whole page (God forbid)
This method does a 'test' rendering on a blank page, to see the rendered height of the buffer
if that too high for the space left on the age in the real document, we do a page break.
This obviously doesn't work if a scenario is longer than a whole page (God forbid)
This method does a ' test ' rendering on a blank page to see the rendered height of the buffer if that too high for the space left on the age in the real document we do a page break . This obviously doesn ' t work if a scenario is longer than a whole page ( God forbid )
def flush
        @scrap.start_new_page
        oldy = @scrap.y
        render @scrap
        height = (oldy - @scrap.y) + 36 
        if ((@pdf.y - height) < @pdf.bounds.bottom)
          @pdf.start_new_page
        end
        render @pdf
        @pdf.move_down(20)
        @buffer = []
      end
def flush @scrap . start_new_page oldy = @scrap . y render @scrap height = ( oldy - @scrap . y ) + 36 if ( ( @pdf . y - height ) < @pdf . bounds . bottom ) @pdf . start_new_page end render @pdf @pdf . move_down ( 20 ) @buffer = [ ] end
This method does a 'test' rendering on a blank page, to see the rendered height of the buffer
if that too high for the space left on the age in the real document, we do a page break.
This method does a ' test ' rendering on a blank page to see the rendered height of the buffer if that too high for the space left on the age in the real document we do a page break .
# whops magic number