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 1781e3f
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'
'475e2df3b691db5b2934d4ff0598cbd69dae26a60840b66d2a2eadc1d2bc30e24c83ba4fea9305a77f42e515d5cf5ffdc8a83587686fb17461cda0c7ad97c364'
end

RSpec.describe Prawn do
Expand Down

0 comments on commit 1781e3f

Please sign in to comment.