Class: Nguyen::Pdf
- Inherits:
-
Object
- Object
- Nguyen::Pdf
- Defined in:
- lib/nguyen/pdf.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #fields ⇒ Object
-
#initialize(path, pdftk) ⇒ Pdf
constructor
A new instance of Pdf.
Constructor Details
#initialize(path, pdftk) ⇒ Pdf
Returns a new instance of Pdf.
5 6 7 8 9 |
# File 'lib/nguyen/pdf.rb', line 5 def initialize(path, pdftk) @path = path raise IOError unless File.readable?(path) @pdftk = pdftk end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/nguyen/pdf.rb', line 3 def path @path end |
Instance Method Details
#fields ⇒ Object
11 12 13 |
# File 'lib/nguyen/pdf.rb', line 11 def fields @fields ||= read_fields end |