Class: Milestoner::Commits::Enrichers::Time

Inherits:
Object
  • Object
show all
Defined in:
lib/milestoner/commits/enrichers/time.rb

Overview

Enriches raw time as a Time instance.

Instance Method Summary collapse

Constructor Details

#initialize(key:) ⇒ Time

Returns a new instance of Time.



8
9
10
# File 'lib/milestoner/commits/enrichers/time.rb', line 8

def initialize key:
  @key = key
end

Instance Method Details

#call(commit) ⇒ Object



12
# File 'lib/milestoner/commits/enrichers/time.rb', line 12

def call(commit) = ::Time.at commit.public_send(key).to_i