Class: Textminer::Mined
- Inherits:
-
Object
- Object
- Textminer::Mined
- Defined in:
- lib/textminer/mined.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#type ⇒ Object
Returns the value of attribute type.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, path, type) ⇒ Mined
constructor
A new instance of Mined.
- #parse ⇒ Object
Constructor Details
#initialize(url, path, type) ⇒ Mined
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
#path ⇒ Object
Returns the value of attribute path.
10 11 12 |
# File 'lib/textminer/mined.rb', line 10 def path @path end |
#type ⇒ Object
Returns the value of attribute type.
11 12 13 |
# File 'lib/textminer/mined.rb', line 11 def type @type end |
#url ⇒ Object
Returns the value of attribute url.
9 10 11 |
# File 'lib/textminer/mined.rb', line 9 def url @url end |
Instance Method Details
#parse ⇒ Object
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 |