Class: TwitterHashtag::Tweet
- Inherits:
-
Object
- Object
- TwitterHashtag::Tweet
- Defined in:
- lib/twitter_hashtag/tweet.rb
Constant Summary collapse
- SEPARATOR =
'~'*80
Instance Attribute Summary collapse
-
#tweet_hash ⇒ Object
readonly
Returns the value of attribute tweet_hash.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tweet_hash) ⇒ Tweet
constructor
A new instance of Tweet.
- #output ⇒ Object
Constructor Details
#initialize(tweet_hash) ⇒ Tweet
Returns a new instance of Tweet.
12 13 14 |
# File 'lib/twitter_hashtag/tweet.rb', line 12 def initialize(tweet_hash) @tweet_hash = tweet_hash end |
Instance Attribute Details
#tweet_hash ⇒ Object (readonly)
Returns the value of attribute tweet_hash.
16 17 18 |
# File 'lib/twitter_hashtag/tweet.rb', line 16 def tweet_hash @tweet_hash end |
Class Method Details
.output(results) ⇒ Object
6 7 8 9 10 |
# File 'lib/twitter_hashtag/tweet.rb', line 6 def self.output(results) results.each do |result_line| new(result_line).output end end |
Instance Method Details
#output ⇒ Object
18 19 20 |
# File 'lib/twitter_hashtag/tweet.rb', line 18 def output puts [SEPARATOR, user, text, link].join("\n") end |