Skip to content

Commit

Permalink
add example of a decument method to the manual
Browse files Browse the repository at this point in the history
  • Loading branch information
Juraj-Sulimanovic committed Jan 30, 2024
1 parent 006917f commit 19fb5c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions manual/basic_concepts/view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def initialize(name)
@name = name
end

def document
@document ||= Prawn::Document.new(page_size: 'A4', page_layout: :landscape, margin: 30)
end

def say_hello
text "Hello, #{@name}!"
end
Expand Down
4 changes: 2 additions & 2 deletions spec/prawn_manual_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
MANUAL_HASH =
case RUBY_ENGINE
when 'ruby'
'7991e4f72e944140840e1c26f0fff331029846eaab148de8483d06491c7808bc4963e8e7376a514e855037f1f1b4197877a31f2df44f511f4f7f5e0ce5df3170'
'ab45a1e814006cb04928f8d0f6c9d0a409c90ffb41dc2fd10e3558e7b314fb99d2a0f5aa29b89a6ae855eaa4ed9840620abbc8bab9c48991aa7f69a98550fa79'
when 'jruby'
'29b8f8cb00910426805ce226fb47c59d6409683f35f0d2c056a6cf837ba086ca5c763ff89266cfc8e11b1d92af60c9974822b12ad761cdbdf520adb005a98750'
'695d3d8fa4daae26726fd3db1da4d0f3552c3d406146bc0ef4094ae7e177b0d16c77bc1d157318e69579bcd613655d16e874627d015428dab5ae50d79e2aea2c'
end

RSpec.describe Prawn do
Expand Down

0 comments on commit 19fb5c0

Please sign in to comment.