Class: PDF::Wrapper::Page
- Inherits:
-
Object
- Object
- PDF::Wrapper::Page
- Defined in:
- lib/pdf/wrapper/page.rb
Overview
a proxy to a PDF::Wrapper object that disallows new pages
Instance Method Summary collapse
-
#initialize(pdf) ⇒ Page
constructor
A new instance of Page.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(pdf) ⇒ Page
Returns a new instance of Page.
7 8 9 |
# File 'lib/pdf/wrapper/page.rb', line 7 def initialize(pdf) @pdf = pdf end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/pdf/wrapper/page.rb', line 11 def method_missing(method, *args, &block) if method.to_sym == :start_new_page raise InvalidOperationError, 'start_new_page is not allowed in the current context' else @pdf.__send__(method, *args, &block) end end |