lib/ayadn/switch.rb in ayadn-1.5.1 vs lib/ayadn/switch.rb in ayadn-1.6.0
- old
+ new
@@ -30,10 +30,10 @@
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
#puts "\e[H\e[2J"
- username = Workers.remove_arobase_if_present([user.first])[0]
+ username = Workers.new.remove_arobase_if_present([user.first])[0]
home_path = Dir.home + "/ayadn"
if File.exist?("#{home_path}/accounts.db")
accounts_db = Databases.init("#{home_path}/accounts.db")
active = accounts_db['ACTIVE']
if username == accounts_db[active][:username]