Class: Tika::Resource
- Inherits:
-
Object
- Object
- Tika::Resource
- Defined in:
- lib/tika/resource.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
- #content_type ⇒ Object
-
#initialize(file, opts = {}) ⇒ Resource
constructor
A new instance of Resource.
- #language ⇒ Object
- #metadata ⇒ Object
- #text ⇒ Object
Constructor Details
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
4 5 6 |
# File 'lib/tika/resource.rb', line 4 def app @app end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
4 5 6 |
# File 'lib/tika/resource.rb', line 4 def file @file end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
4 5 6 |
# File 'lib/tika/resource.rb', line 4 def opts @opts end |
Instance Method Details
#content_type ⇒ Object
20 21 22 |
# File 'lib/tika/resource.rb', line 20 def content_type @content_type ||= app.detect(file, opts) end |
#language ⇒ Object
24 25 26 |
# File 'lib/tika/resource.rb', line 24 def language @language ||= app.get_language(file, opts) end |
#metadata ⇒ Object
16 17 18 |
# File 'lib/tika/resource.rb', line 16 def @metadata ||= app.(file, opts) end |
#text ⇒ Object
12 13 14 |
# File 'lib/tika/resource.rb', line 12 def text @text ||= app.get_text(file, opts) end |