Class: Quartz::PDFContext
- Inherits:
-
Object
- Object
- Quartz::PDFContext
- Defined in:
- lib/rubyquartz/pdf_context.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PDFContext
constructor
A new instance of PDFContext.
- #page ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ PDFContext
Returns a new instance of PDFContext.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rubyquartz/pdf_context.rb', line 29 def initialize(={}) super() path = [:path] if path box = [:media] || Rect.new(0, 0, 100, 100) _initialize_with_path(path, box) return end raise "Cannot determine how to create PDFContext from given options" end |
Instance Method Details
#page ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/rubyquartz/pdf_context.rb', line 43 def page begin_page success = true begin yield self ensure end_page success = false end success end |