Class: Myun2::TwitterShell::Shell
- Inherits:
-
ShellBase
- Object
- ShellBase
- Myun2::TwitterShell::Shell
- Defined in:
- lib/myun2/twitter_shell/shell.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(*params) ⇒ Shell
constructor
A new instance of Shell.
- #login(*params) ⇒ Object
- #ls(*params) ⇒ Object
- #prompt ⇒ Object
- #tail(*params) ⇒ Object
- #tweet(*params) ⇒ Object (also: #post, #update)
Constructor Details
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
11 12 13 |
# File 'lib/myun2/twitter_shell/shell.rb', line 11 def client @client end |
Instance Method Details
#login(*params) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/myun2/twitter_shell/shell.rb', line 41 def login(*params) Login.new(*params) @profile = Profile.load @client = Client.new(@profile.data) end |
#ls(*params) ⇒ Object
28 29 30 |
# File 'lib/myun2/twitter_shell/shell.rb', line 28 def ls(*params) Ls.new(client, *params) end |
#prompt ⇒ Object
37 38 39 |
# File 'lib/myun2/twitter_shell/shell.rb', line 37 def prompt "twsh:$ " end |
#tail(*params) ⇒ Object
32 33 34 35 |
# File 'lib/myun2/twitter_shell/shell.rb', line 32 def tail(*params) #ls(*params) Tail.new(@profile.data, *params) end |
#tweet(*params) ⇒ Object Also known as: post, update
22 23 24 |
# File 'lib/myun2/twitter_shell/shell.rb', line 22 def tweet(*params) client.update params.join(" ") end |