Sha256: e054785d7d81e5e416c4a7cba7f8fb300a518a1e49162ec1d9c2a4fcdbf68973

Contents?: true

Size: 480 Bytes

Versions: 2

Compression:

Stored size: 480 Bytes

Contents

require 'httmultiparty' 

module NgBankParser
	class PDFUnlocker
		include HTTMultiParty
		base_uri 'http://pdf-unlocker.herokuapp.com'

		def initialize(file, password)
			@pdf = file
			@password = password
		end

		
		def unlocked_pdf
			options = { :pdf => @pdf, :password => @password }
			begin
				response = self.class.post('/rest/pdf/unlock', :query => options, :detect_mime_type => true).parsed_response
			rescue StandardError
				response = nil
			end
		end

	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ng-bank-parser-0.1.3 lib/ng-bank-parser/pdf-unlocker.rb
ng-bank-parser-0.1.2 lib/ng-bank-parser/pdf-unlocker.rb