class Coauthor::Git::User
Attributes
email[R]
name[R]
Public Class Methods
call()
click to toggle source
# File lib/coauthor/git/user.rb, line 13 def self.call user_info = Prompt.fetch_user_info.first new(name: user_info['name'], email: user_info['email']) rescue SystemExit, Interrupt puts "\n...User setup cancelled".colorize(:red) end
new(name:, email:)
click to toggle source
# File lib/coauthor/git/user.rb, line 7 def initialize(name:, email:) @name = name @email = email set_git_config end
Private Instance Methods
set_git_config()
click to toggle source
# File lib/coauthor/git/user.rb, line 22 def set_git_config system("git config user.name '#{name}'") system("git config user.email '#{email}'") puts "...DONE! Git repository author has been set to #{name} <#{email}>".colorize(:green) end