Sha256: 4beb2406222a0a32b96c8437591fe831bc2048f80559c0b10831679dd8b98674

Contents?: true

Size: 472 Bytes

Versions: 1

Compression:

Stored size: 472 Bytes

Contents

module Tika
  class Resource

    attr_reader :file, :app, :opts
    
    def initialize(file, opts={})
      @file = file
      @app = App.new
      @opts = opts
    end

    def text
      @text ||= app.get_text(file, opts)
    end

    def metadata
      @metadata ||= app.get_metadata(file, opts)
    end

    def content_type
      @content_type ||= app.detect(file, opts)
    end

    def language
      @language ||= app.get_language(file, opts)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tika-app-0.2.1 lib/tika/resource.rb