class Myun2::TwitterShell::Shell
Attributes
client[R]
Public Class Methods
new(*params)
click to toggle source
Calls superclass method
# File lib/myun2/twitter_shell/shell.rb, line 13 def initialize(*params) if @profile = Profile.load @client = Client.new(@profile.data) if params && params.length > 0 return self.send(*params) end else puts "Please first login" end version super end
Public Instance Methods
login(*params)
click to toggle source
# File lib/myun2/twitter_shell/shell.rb, line 60 def login(*params) Login.new(*params) @profile = Profile.load @client = Client.new(@profile.data) end
ls(*params)
click to toggle source
# File lib/myun2/twitter_shell/shell.rb, line 36 def ls(*params) Ls.new(client, *params) end
prompt()
click to toggle source
# File lib/myun2/twitter_shell/shell.rb, line 56 def prompt "twsh:$ " end
tail(*params)
click to toggle source
# File lib/myun2/twitter_shell/shell.rb, line 40 def tail(*params) #ls(*params) puts "Waiting for timelime..." if params[0] == '&' @tail_thread = Thread.start do Tail.new(@profile.data, *params) end else Tail.new(@profile.data, *params) end end
tweet(*params)
click to toggle source
# File lib/myun2/twitter_shell/shell.rb, line 27 def tweet(*params) client.update params.join(" ") puts "Post was successfully." end
version()
click to toggle source
# File lib/myun2/twitter_shell/shell.rb, line 52 def version puts "twsh #{VERSION}" end