Class: Git::Duet::AuthorMapper
- Inherits:
-
Object
- Object
- Git::Duet::AuthorMapper
- Defined in:
- lib/git/duet/author_mapper.rb
Instance Attribute Summary collapse
-
#authors_file ⇒ Object
Returns the value of attribute authors_file.
Instance Method Summary collapse
-
#initialize(authors_file = nil, email_lookup = nil) ⇒ AuthorMapper
constructor
A new instance of AuthorMapper.
- #map(*initials_list) ⇒ Object
Constructor Details
#initialize(authors_file = nil, email_lookup = nil) ⇒ AuthorMapper
Returns a new instance of AuthorMapper.
8 9 10 11 12 13 14 |
# File 'lib/git/duet/author_mapper.rb', line 8 def initialize( = nil, email_lookup = nil) @authors_file = || ENV['GIT_DUET_AUTHORS_FILE'] || File.join(ENV['HOME'], '.git-authors') @email_lookup = email_lookup || ENV['GIT_DUET_EMAIL_LOOKUP_COMMAND'] end |
Instance Attribute Details
#authors_file ⇒ Object
Returns the value of attribute authors_file.
6 7 8 |
# File 'lib/git/duet/author_mapper.rb', line 6 def @authors_file end |
Instance Method Details
#map(*initials_list) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/git/duet/author_mapper.rb', line 16 def map(*initials_list) = {} initials_list.each do |initials| [initials] = (initials) end end |