Sha256: 159b89c7d2476ccdf803057e865d9d42489d1ece76b6c8e1ce867765cda72d0a

Contents?: true

Size: 349 Bytes

Versions: 1

Compression:

Stored size: 349 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
    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.0 lib/ocr_space.rb