Class: Nguyen::Pdf

Inherits:
Object
  • Object
show all
Defined in:
lib/nguyen/pdf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, pdftk) ⇒ Pdf

Returns a new instance of Pdf.

Raises:

  • (IOError)


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

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/nguyen/pdf.rb', line 3

def path
  @path
end

Instance Method Details

#fieldsObject



11
12
13
# File 'lib/nguyen/pdf.rb', line 11

def fields
  @fields ||= read_fields
end