Class: Milestoner::Commits::Enrichers::Time
- Inherits:
-
Object
- Object
- Milestoner::Commits::Enrichers::Time
- Defined in:
- lib/milestoner/commits/enrichers/time.rb
Overview
Enriches raw time as a Time instance.
Instance Method Summary collapse
- #call(commit) ⇒ Object
-
#initialize(key:) ⇒ Time
constructor
A new instance of Time.
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 |