Sha256: 1a83a8b0da8a1906fcd1074d3e9b5dde4ea003d4fbda5d722dbb7cd54c0e5019

Contents?: true

Size: 1.09 KB

Versions: 3

Compression:

Stored size: 1.09 KB

Contents

# encoding: utf-8
#
# Prawn manual how to read this manual page. 
#
require File.expand_path(File.join(File.dirname(__FILE__),
                                   %w[.. example_helper]))

filename = File.basename(__FILE__).gsub('.rb', '.pdf')
Prawn::Example.generate(filename) do
  move_down 200

  image "#{Prawn::DATADIR}/images/prawn.png",
        :scale => 0.9,
        :at => [10, cursor]
        
  formatted_text_box([ {:text => "Prawn\n",
                        :styles => [:bold],
                        :size => 100}
                     ], :at => [170, cursor - 50])

  formatted_text_box([ {:text => "by example",
                        :font => 'Courier',
                        :size => 60}
                     ], :at => [170, cursor - 160])

  #long git commit hash
  #commit = `git show --pretty=%H`
  #short git commit hash
  commit = `git show --pretty=%h`
  formatted_text_box([  {:text => "Last Update: #{Time.now.strftime("%Y-%m-%d")}\n
                                   git commit: #{commit}",
                         :size => 12}
                    ],   :at => [390, cursor - 620])
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
prawn-0.13.2 manual/manual/cover.rb
prawn-0.13.1 manual/manual/cover.rb
prawn-0.13.0 manual/manual/cover.rb