Class: Trop::InfoGit::User
- Inherits:
-
Object
- Object
- Trop::InfoGit::User
- Defined in:
- lib/trop/infogit.rb
Instance Attribute Summary collapse
-
#user_email ⇒ Object
Returns the value of attribute user_email.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize ⇒ User
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_email ⇒ Object
Returns the value of attribute user_email.
8 9 10 |
# File 'lib/trop/infogit.rb', line 8 def user_email @user_email end |
#user_name ⇒ Object
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_mail ⇒ Object
20 21 22 23 |
# File 'lib/trop/infogit.rb', line 20 def self.user_mail initialize @user_mail.chomp! end |
.user_name ⇒ Object
15 16 17 18 |
# File 'lib/trop/infogit.rb', line 15 def self.user_name initialize @user_name.chomp! end |