Created
November 24, 2012 23:47
-
-
Save bigthyme/4141836 to your computer and use it in GitHub Desktop.
pt.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#We are using a twitter API method here: http://tutorials.jumpstartlab.com/topics/environment/environment.html | |
def tweet(message) | |
#[5]if logic that will check if the user's message is equal to 140. If the message is shorter, | |
#then it'll tell the user how many characters were used out of 140. If not, it will throw an | |
#error message. | |
if message.length >= 140 | |
puts "People are yawning, please shorten your message" | |
else | |
puts "You've used " + message.length.to_s + " characters out of 140" | |
end | |
@client.update(message) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment