Class: LongTweet::Tweet
- Inherits:
-
Object
- Object
- LongTweet::Tweet
- Defined in:
- lib/long_tweet/tweet.rb
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, agent = Twitter) ⇒ Tweet
constructor
A new instance of Tweet.
- #post ⇒ Object
Constructor Details
#initialize(text, agent = Twitter) ⇒ Tweet
Returns a new instance of Tweet.
7 8 9 10 |
# File 'lib/long_tweet/tweet.rb', line 7 def initialize text, agent = Twitter @text = text @agent = agent end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
5 6 7 |
# File 'lib/long_tweet/tweet.rb', line 5 def agent @agent end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/long_tweet/tweet.rb', line 5 def text @text end |
Instance Method Details
#post ⇒ Object
12 13 14 |
# File 'lib/long_tweet/tweet.rb', line 12 def post agent.update(text) end |