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 0d0286b
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'
'8ace5f35f945e5994647cefc2cf7bc369d131e0646d91eb8aeb94e58f72de18d8e7bf82f58fc45406110c4adad239dcbe834059580d29fec2b2a039db67db04c'
'115d436fb47c029de59a94dd3407a82e781cb1833d850dc01a0686078f297fdcefab5924f84aac14d3adfa6f6b3a693b21eda4a81699a6df872754d608ab6593'
when 'jruby'
'b77a740d3290192360c4c083018ca61ccc88d42e7c6a152c7bc394d751f5f08d85aec613549f6660713644b00518561cc0f9c947701f01e8c25632c9db81201a'
'1edbe21b6b6335aa805af00ddd0b944c184ab445ddeb92393e641da1cdcbd9900025bc5f5c313576d890798c10e509247e13d2340add5fe092da1e2684ca406f'
end

RSpec.describe Prawn do
Expand Down

0 comments on commit 0d0286b

Please sign in to comment.