From 8ca940364f1629bab01a41d7435420af59890c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Sulimanovi=C4=87?= <83012294+Juraj-Sulimanovic@users.noreply.github.com> Date: Tue, 16 Jan 2024 10:04:50 +0100 Subject: [PATCH] add example of a decument method to the manual --- manual/basic_concepts/view.rb | 4 ++++ spec/prawn_manual_spec.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/manual/basic_concepts/view.rb b/manual/basic_concepts/view.rb index 7dad733b7..07cf8e76f 100644 --- a/manual/basic_concepts/view.rb +++ b/manual/basic_concepts/view.rb @@ -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 diff --git a/spec/prawn_manual_spec.rb b/spec/prawn_manual_spec.rb index b92c55441..087ef67b1 100644 --- a/spec/prawn_manual_spec.rb +++ b/spec/prawn_manual_spec.rb @@ -6,7 +6,7 @@ MANUAL_HASH = case RUBY_ENGINE when 'ruby' - '8ace5f35f945e5994647cefc2cf7bc369d131e0646d91eb8aeb94e58f72de18d8e7bf82f58fc45406110c4adad239dcbe834059580d29fec2b2a039db67db04c' + '115d436fb47c029de59a94dd3407a82e781cb1833d850dc01a0686078f297fdcefab5924f84aac14d3adfa6f6b3a693b21eda4a81699a6df872754d608ab6593' when 'jruby' 'b77a740d3290192360c4c083018ca61ccc88d42e7c6a152c7bc394d751f5f08d85aec613549f6660713644b00518561cc0f9c947701f01e8c25632c9db81201a' end