class Author

Attributes

email[R]
name[R]

Public Class Methods

include_mail() click to toggle source
# File lib/gitstats/author.rb, line 8
def self.include_mail
  @@include_mail ||= false
  @@include_mail
end
include_mail=(include_mail) click to toggle source
# File lib/gitstats/author.rb, line 4
def self.include_mail=(include_mail)
  @@include_mail = include_mail
end
new(name, email) click to toggle source
# File lib/gitstats/author.rb, line 16
def initialize(name, email)
  @name = name
  @email = email
end

Public Instance Methods

eql?(b) click to toggle source
# File lib/gitstats/author.rb, line 29
def eql?(b)
  to_s.hash == b.to_s.hash
end
hash() click to toggle source
# File lib/gitstats/author.rb, line 33
def hash
  to_s.hash
end
to_s() click to toggle source
# File lib/gitstats/author.rb, line 21
def to_s
  if self.class.include_mail
    "#{name} <#{email}>"
  else
    name
  end
end