Class: Trop::InfoGit::User

Inherits:
Object
  • Object
show all
Defined in:
lib/trop/infogit.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUser

Returns a new instance of User.



10
11
12
13
# File 'lib/trop/infogit.rb', line 10

def initialize
  @user_name ||= `git config --get --global user.name`
  @user_mail ||= `git config --get --global user.email`
end

Instance Attribute Details

#user_emailObject

Returns the value of attribute user_email.



8
9
10
# File 'lib/trop/infogit.rb', line 8

def user_email
  @user_email
end

#user_nameObject

Returns the value of attribute user_name.



8
9
10
# File 'lib/trop/infogit.rb', line 8

def user_name
  @user_name
end

Class Method Details

.user_mailObject



20
21
22
23
# File 'lib/trop/infogit.rb', line 20

def self.user_mail
  initialize
  @user_mail.chomp!
end

.user_nameObject



15
16
17
18
# File 'lib/trop/infogit.rb', line 15

def self.user_name
  initialize
  @user_name.chomp!
end