Class: LongTweet::Tweet

Inherits:
Object
  • Object
show all
Defined in:
lib/long_tweet/tweet.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#agentObject (readonly)

Returns the value of attribute agent.



5
6
7
# File 'lib/long_tweet/tweet.rb', line 5

def agent
  @agent
end

#textObject (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

#postObject



12
13
14
# File 'lib/long_tweet/tweet.rb', line 12

def post
  agent.update(text)
end