Class: XCPretty::UsernameParser

Inherits:
Object
  • Object
show all
Defined in:
lib/xcpretty/reporters/learn.rb

Class Method Summary collapse

Class Method Details

.get_usernameObject



81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/xcpretty/reporters/learn.rb', line 81

def self.get_username
  parser = NetrcInteractor.new
  username = parser.username

  if !username
    print "Enter your github username: "
    username = gets.strip
    user_id = GitHubInteractor.get_user_id_for(username)
    parser.write(username, user_id)
  end

  username
end