Sha256: ec98813721e409ae16443f6a507adf9468bf9fdd939fb32f4d13bf343f1de042

Contents?: true

Size: 257 Bytes

Versions: 3

Compression:

Stored size: 257 Bytes

Contents

require 'tmpdir'
require 'securerandom'
require 'pathname'

class RTesseract
  module Base
    def temp_file(ext = '')
      @rand_file ||= "rtesseract_#{SecureRandom.uuid}"

      Pathname.new(Dir.tmpdir).join("#{@rand_file}#{ext}").to_s
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rtesseract-3.0.5 lib/rtesseract/base.rb
rtesseract-3.0.4 lib/rtesseract/base.rb
rtesseract-3.0.3 lib/rtesseract/base.rb