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 1e2e22a
Showing 1 changed file with 4 additions and 0 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
@pdf ||= Prawn::Document.new(page_size: 'A4', page_layout: :landscape, margin: 30)
end

def say_hello
text "Hello, #{@name}!"
end
Expand Down

0 comments on commit 1e2e22a

Please sign in to comment.