Skip to content

Writing your Parser

Timi Ajiboye edited this page Sep 8, 2015 · 4 revisions

Try to make your code as readable as possible. We advise you separate your main parser from your helpers, but that’s up to you.

Currently we use a few gems nokogiri, roo, pdf-reader, pdf-unlocker, activesupport and rest-client. Please try to work with those modules as much as is possible rather than adding new gems that do the same work.

Add your parser file to the parsers folder. The file should be named in the same format i.e hb-excel-parser.rb. Your helpers or whatever else you need should be in a folder with the same name. e.g hb-excel-parser/helpers.rb

Class Name Format: Bank Name + Parser Format e.g HbExcel Parse Method: Your new class must return a parse method that takes a path and password (password should be initialized to nil)

For example:

module NgBankParser
		class HbExcel
			def self.parse
			end
                 end
end
Clone this wiki locally