lib/ayadn/switch.rb in ayadn-1.2.8 vs lib/ayadn/switch.rb in ayadn-1.2.9
- old
+ new
@@ -1,8 +1,9 @@
# encoding: utf-8
module Ayadn
class Switch
+
def list
home_path = Dir.home + "/ayadn"
if File.exist?("#{home_path}/accounts.db")
accounts_db = Databases.init("#{home_path}/accounts.db")
active = accounts_db['ACTIVE']
@@ -22,9 +23,10 @@
end
else
please
end
end
+
def switch(user)
if user.empty? || user.nil?
puts "\n\nOops, something went wrong, I couldn't get your username. Please try again.\n\n".color(:red)
exit
end