Class: Milestoner::Models::Commit

Inherits:
Struct
  • Object
show all
Includes:
Gitt::Directable
Defined in:
lib/milestoner/models/commit.rb

Overview

Represents an enriched commit.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCommit

Returns a new instance of Commit.



39
40
41
42
# File 'lib/milestoner/models/commit.rb', line 39

def initialize(**)
  super
  freeze
end

Class Method Details

.for(commit) ⇒ Object



37
# File 'lib/milestoner/models/commit.rb', line 37

def self.for(commit, **) = new(**commit.to_h.slice(*COMMIT_COMMON_ATTRIBUTES), **)