manual/outline/insert_section_after.rb in prawn-1.0.0 vs manual/outline/insert_section_after.rb in prawn-1.1.0
- old
+ new
@@ -11,24 +11,24 @@
#
require File.expand_path(File.join(File.dirname(__FILE__),
%w[.. example_helper]))
filename = File.basename(__FILE__).gsub('.rb', '.pdf')
-Prawn::Example.generate(filename) do
+Prawn::ManualBuilder::Example.generate(filename) do
# First we create 10 pages and some default outline
(1..10).each do |index|
text "Page #{index}"
start_new_page
end
-
+
outline.define do
- section("Section 1", :destination => 1) do
+ section("Section 1", :destination => 1) do
page :title => "Page 2", :destination => 2
page :title => "Page 3", :destination => 3
end
end
-
+
# Now we will start adding nodes to the previous outline
outline.insert_section_after("Page 2") do
outline.section("Section after Page 2") do
outline.page :title => "Page 4", :destination => 4
end
@@ -37,10 +37,10 @@
outline.insert_section_after("Section 1") do
outline.section("Section after Section 1") do
outline.page :title => "Page 5", :destination => 5
end
end
-
+
# Adding just a page
outline.insert_section_after("Page 3") do
outline.page :title => "Page after Page 3", :destination => 6
end
end