Class: Coauthor::Git::User
- Inherits:
-
Object
- Object
- Coauthor::Git::User
- Defined in:
- lib/coauthor/git/user.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, email:) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(name:, email:) ⇒ User
Returns a new instance of User.
7 8 9 10 11 |
# File 'lib/coauthor/git/user.rb', line 7 def initialize(name:, email:) @name = name @email = email set_git_config end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
6 7 8 |
# File 'lib/coauthor/git/user.rb', line 6 def email @email end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/coauthor/git/user.rb', line 6 def name @name end |
Class Method Details
.call ⇒ Object
13 14 15 16 17 18 |
# 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 |