Module: Pdfcrate::View
- Defined in:
- lib/pdfcrate.rb
Overview
Prawn::View-compatible mixin: delegates method calls to self.document
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, **kwargs, &block) ⇒ Object (private)
15 16 17 18 19 20 21 22 23 |
# File 'lib/pdfcrate.rb', line 15 def method_missing(name, *args, **kwargs, &block) return super unless document.respond_to?(name) if kwargs.empty? document.send(name, *args, &block) else document.send(name, *args, **kwargs, &block) end end |
Instance Method Details
#document ⇒ Object
9 10 11 |
# File 'lib/pdfcrate.rb', line 9 def document @document end |