Class: Metior::Git::Actor
Overview
Represents an actor in a Git source code repository, i.e. an author or committer.
Instance Attribute Summary
Attributes inherited from Actor
#authored_commits, #committed_commits, #id, #name
Class Method Summary collapse
-
.id_for(actor) ⇒ String
Returns the email address as an identifier for the given actor.
Instance Method Summary collapse
-
#initialize(repo, actor) ⇒ Actor
constructor
Creates a new actor instance.
Methods inherited from Actor
#additions, #deletions, #inspect, #modifications
Methods included from AutoIncludeVCS
Constructor Details
#initialize(repo, actor) ⇒ Actor
Creates a new actor instance
33 34 35 36 37 |
# File 'lib/metior/git/actor.rb', line 33 def initialize(repo, actor) super repo @id = actor.email @name = actor.name end |
Class Method Details
.id_for(actor) ⇒ String
Returns the email address as an identifier for the given actor. Git uses email addresses as identifiers for its actors.
25 26 27 |
# File 'lib/metior/git/actor.rb', line 25 def self.id_for(actor) actor.email end |