Class: Textminer::Mined
- Inherits:
-
Object
- Object
- Textminer::Mined
- Defined in:
- lib/textminer/mined.rb
Overview
:nodoc:
Instance Attribute Summary (collapse)
-
- (Object) path
Returns the value of attribute path.
-
- (Object) type
Returns the value of attribute type.
-
- (Object) url
Returns the value of attribute url.
Instance Method Summary (collapse)
-
- (Mined) initialize(url, path, type)
constructor
A new instance of Mined.
- - (Object) parse
Constructor Details
- (Mined) initialize(url, path, type)
Returns a new instance of Mined
13 14 15 16 17 |
# File 'lib/textminer/mined.rb', line 13 def initialize(url, path, type) self.url = url self.path = path self.type = type end |
Instance Attribute Details
- (Object) path
Returns the value of attribute path
10 11 12 |
# File 'lib/textminer/mined.rb', line 10 def path @path end |
- (Object) type
Returns the value of attribute type
11 12 13 |
# File 'lib/textminer/mined.rb', line 11 def type @type end |
- (Object) url
Returns the value of attribute url
9 10 11 |
# File 'lib/textminer/mined.rb', line 9 def url @url end |
Instance Method Details
- (Object) parse
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/textminer/mined.rb', line 19 def parse case self.type when 'xml' parse_xml(self.path) when 'plain' parse_plain(self.path) when 'pdf' parse_pdf(self.path) end end |