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 ae26ad2
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'
'a139c219871bfd99834d6934f1094e08278da161f9a87b921c1a3c1e45560c276f74532ad323fbf0b8a28607bc1187f59c7e0a630dab93a1f68012398c9dc091'
when 'jruby'
'b77a740d3290192360c4c083018ca61ccc88d42e7c6a152c7bc394d751f5f08d85aec613549f6660713644b00518561cc0f9c947701f01e8c25632c9db81201a'
'695d3d8fa4daae26726fd3db1da4d0f3552c3d406146bc0ef4094ae7e177b0d16c77bc1d157318e69579bcd613655d16e874627d015428dab5ae50d79e2aea2c'
end

RSpec.describe Prawn do
Expand Down

0 comments on commit ae26ad2

Please sign in to comment.