Class: Tane::Commands::Logout

Inherits:
Base
  • Object
show all
Defined in:
lib/tane/commands/logout.rb

Class Method Summary collapse

Methods inherited from Base

fire

Methods included from Helpers

included

Class Method Details

.help_textObject



14
15
16
17
18
19
20
21
22
# File 'lib/tane/commands/logout.rb', line 14

def help_text
  <<-EOL
Usage:

tane logout

Deletes the Bushido credentials from the user's `$HOME` directory.
EOL
end

.process(args) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/tane/commands/logout.rb', line 3

def process(args)
  if logged_in?
    term.say "Logging out #{username} from this computer..."
    destroy_credentials
    term.say "Finished! All gone! Buh bye!"
  else
    term.say "Couldn't find any Bushido account on this computer... kind of lonesome in that way, what with just you and me and all..."
  end
end