Sha256: 45d03542da7470213d0771f0c61e9db0dd7aaab0fa31a625355684a90990756b

Contents?: true

Size: 368 Bytes

Versions: 1

Compression:

Stored size: 368 Bytes

Contents

require 'ocr_space/version'
require 'ocr_space/convert'
require 'ocr_space/banner'

module OcrSpace
  class Resource
    attr_reader :data

    include OcrSpace::Convert

    def initialize(apikey: ENV['ocr_api_key'])
      @api_key = apikey
      @data = nil
    end

    def text_data
        @data[0]['ParsedText'].delete("\n").delete("\r").strip
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ocr_space-2.1 lib/ocr_space.rb