Created
April 4, 2011 22:35
-
-
Save racbarn/902616 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def run | |
puts "Welcome to the JSLTwitter Client" | |
command = "" | |
until command == "q" | |
puts "Enter Command:" | |
input = gets.chomp | |
command = input.split.first | |
message = input.split[1..-1].join(" ") | |
if command =="t" | |
tweet(message) | |
else | |
puts "Sorry, I don't know how to (#{command.inspect})" | |
end | |
def dm(target, message) | |
puts "Trying to send #{target} this direct message:" | |
puts message | |
when 'dm'then dm(parts[1], parts[1..-1].join(" ")) | |
puts "d, " ", jumpstartfoundry, | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment