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 17, 2024
1 parent c3a47a4 commit 8ca9403
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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
@pdf ||= Prawn::Document.new(page_size: 'A4', page_layout: :landscape, margin: 30)
end

def say_hello
text "Hello, #{@name}!"
end
Expand Down
2 changes: 1 addition & 1 deletion spec/prawn_manual_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
MANUAL_HASH =
case RUBY_ENGINE
when 'ruby'
'8ace5f35f945e5994647cefc2cf7bc369d131e0646d91eb8aeb94e58f72de18d8e7bf82f58fc45406110c4adad239dcbe834059580d29fec2b2a039db67db04c'
'115d436fb47c029de59a94dd3407a82e781cb1833d850dc01a0686078f297fdcefab5924f84aac14d3adfa6f6b3a693b21eda4a81699a6df872754d608ab6593'
when 'jruby'
'b77a740d3290192360c4c083018ca61ccc88d42e7c6a152c7bc394d751f5f08d85aec613549f6660713644b00518561cc0f9c947701f01e8c25632c9db81201a'
end
Expand Down

0 comments on commit 8ca9403

Please sign in to comment.