Class: SheetFiller::Pdf::Wrapper
- Inherits:
-
Struct
- Object
- Struct
- SheetFiller::Pdf::Wrapper
- Defined in:
- lib/sheet_filler/pdf/wrapper.rb
Instance Attribute Summary collapse
-
#form_path ⇒ Object
Returns the value of attribute form_path.
-
#output_path ⇒ Object
Returns the value of attribute output_path.
Instance Method Summary collapse
Instance Attribute Details
#form_path ⇒ Object
Returns the value of attribute form_path
5 6 7 |
# File 'lib/sheet_filler/pdf/wrapper.rb', line 5 def form_path @form_path end |
#output_path ⇒ Object
Returns the value of attribute output_path
5 6 7 |
# File 'lib/sheet_filler/pdf/wrapper.rb', line 5 def output_path @output_path end |
Instance Method Details
#fill(data) ⇒ Object
14 15 16 17 |
# File 'lib/sheet_filler/pdf/wrapper.rb', line 14 def fill(data) parser.fill_form(form_path, output_path, data) output_path end |
#parse_fields(data) ⇒ Object
10 11 12 |
# File 'lib/sheet_filler/pdf/wrapper.rb', line 10 def parse_fields(data) parser.fields(form_path).map { |field| field.attributes["FieldName"] } end |
#parser ⇒ Object
6 7 8 |
# File 'lib/sheet_filler/pdf/wrapper.rb', line 6 def parser @parser ||= PdftkForms::Wrapper.new end |