Class: Coauthor::Git::User

Inherits:
Object
  • Object
show all
Defined in:
lib/coauthor/git/user.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#emailObject (readonly)

Returns the value of attribute email.



6
7
8
# File 'lib/coauthor/git/user.rb', line 6

def email
  @email
end

#nameObject (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

.callObject



13
14
15
16
17
18
# File 'lib/coauthor/git/user.rb', line 13

def self.call
   = Prompt..first
  new(name: ['name'], email: ['email'])
rescue SystemExit, Interrupt
  puts "\n...User setup cancelled".colorize(:red)
end