Class: Rundown::Parser
- Inherits:
-
Object
- Object
- Rundown::Parser
- Defined in:
- lib/rundown/parser.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
- #dates ⇒ Object
- #emails ⇒ Object
- #hashtags ⇒ Object
-
#initialize(text) ⇒ Parser
constructor
A new instance of Parser.
- #phones ⇒ Object
- #sentiment ⇒ Object
- #usernames ⇒ Object
Constructor Details
#initialize(text) ⇒ Parser
Returns a new instance of Parser.
5 6 7 |
# File 'lib/rundown/parser.rb', line 5 def initialize(text) @text = text end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/rundown/parser.rb', line 3 def text @text end |
Instance Method Details
#dates ⇒ Object
9 10 11 |
# File 'lib/rundown/parser.rb', line 9 def dates @dates ||= Processors::Dates.new(text).process end |
#emails ⇒ Object
13 14 15 |
# File 'lib/rundown/parser.rb', line 13 def emails @email ||= Processors::Email.new(text).process end |
#hashtags ⇒ Object
29 30 31 |
# File 'lib/rundown/parser.rb', line 29 def @hashtags ||= Processors::Hashtags.new(text).process end |
#phones ⇒ Object
17 18 19 |
# File 'lib/rundown/parser.rb', line 17 def phones @phone ||= Processors::Phone.new(text).process end |
#sentiment ⇒ Object
21 22 23 |
# File 'lib/rundown/parser.rb', line 21 def sentiment @sentiment ||= Processors::Sentiment.new(text).process end |
#usernames ⇒ Object
25 26 27 |
# File 'lib/rundown/parser.rb', line 25 def usernames @usernames ||= Processors::Twitter.new(text).process end |