manual/basic_concepts/basic_concepts.rb in prawn-1.0.0 vs manual/basic_concepts/basic_concepts.rb in prawn-1.1.0
- old
+ new
@@ -1,22 +1,22 @@
# encoding: utf-8
#
# Examples for Prawn basic concepts.
#
-require File.expand_path(File.join(File.dirname(__FILE__),
- %w[.. example_helper]))
-Prawn::Example.generate("basic_concepts.pdf", :page_size => "FOLIO") do
-
+require_relative "../example_helper"
+
+Prawn::ManualBuilder::Example.generate("basic_concepts.pdf", :page_size => "FOLIO") do
+
package "basic_concepts" do |p|
-
+
p.example "creation", :eval_source => false, :full_source => true
p.example "origin"
p.example "cursor"
p.example "other_cursor_helpers"
p.example "adding_pages"
p.example "measurement"
-
+
p.intro do
prose("This chapter covers the minimum amount of functionality you'll need to start using Prawn.
If you are new to Prawn this is the first chapter to read. Once you are comfortable with the concepts shown here you might want to check the Basics section of the Graphics, Bounding Box and Text sections.