Class: Markovian::Importers::Twitter::Tweet
- Inherits:
-
Object
- Object
- Markovian::Importers::Twitter::Tweet
- Defined in:
- lib/markovian/importers/twitter/tweet.rb
Overview
Represents an individual tweet
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text) ⇒ Tweet
constructor
A new instance of Tweet.
- #interesting_text ⇒ Object
-
#mentions ⇒ Object
Not currently used, but we might want to weight mentions later.
Constructor Details
#initialize(text) ⇒ Tweet
Returns a new instance of Tweet.
7 8 9 |
# File 'lib/markovian/importers/twitter/tweet.rb', line 7 def initialize(text) @text = text end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
6 7 8 |
# File 'lib/markovian/importers/twitter/tweet.rb', line 6 def text @text end |
Instance Method Details
#interesting_text ⇒ Object
16 17 18 |
# File 'lib/markovian/importers/twitter/tweet.rb', line 16 def interesting_text without_urls(without_leading_dot(text)) end |
#mentions ⇒ Object
Not currently used, but we might want to weight mentions later.
12 13 14 |
# File 'lib/markovian/importers/twitter/tweet.rb', line 12 def mentions text.scan(/(\@[a-z0-9_]+)/).flatten end |