Class: Pixelpress::Document
- Inherits:
-
Object
- Object
- Pixelpress::Document
- Defined in:
- lib/pixelpress/document.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(file, renderer, options = {}) ⇒ Document
constructor
A new instance of Document.
- #pdf ⇒ Object
Constructor Details
#initialize(file, renderer, options = {}) ⇒ Document
Returns a new instance of Document.
5 6 7 8 9 |
# File 'lib/pixelpress/document.rb', line 5 def initialize(file, renderer, = {}) @file = file @renderer = renderer @filename = [:filename] end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
3 4 5 |
# File 'lib/pixelpress/document.rb', line 3 def filename @filename end |
Instance Method Details
#html ⇒ Object
11 12 13 |
# File 'lib/pixelpress/document.rb', line 11 def html file.read end |
#pdf ⇒ Object
15 16 17 |
# File 'lib/pixelpress/document.rb', line 15 def pdf @pdf ||= renderer.render(file) end |