Method: Tesseract::API#init

Defined in:
lib/tesseract/api.rb

#init(datapath = nil, language = 'eng', mode = :DEFAULT) ⇒ Object



102
103
104
105
106
# File 'lib/tesseract/api.rb', line 102

def init (datapath = nil, language = 'eng', mode = :DEFAULT)
	unless C::BaseAPI.init(to_ffi, datapath || Tesseract.prefix || '/usr/share', language.to_s, mode).zero?
		raise 'the API did not Init correctly'
	end
end