Class: Spoom::Git::Commit
- Inherits:
-
T::Struct
- Object
- T::Struct
- Spoom::Git::Commit
- Extended by:
- T::Sig
- Defined in:
- lib/spoom/context/git.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.parse_line(string) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/spoom/context/git.rb', line 14 def parse_line(string) sha, epoch = string.split(" ", 2) return unless sha && epoch time = Time.strptime(epoch, "%s") Commit.new(sha: sha, time: time) end |
Instance Method Details
#timestamp ⇒ Object
27 28 29 |
# File 'lib/spoom/context/git.rb', line 27 def time.to_i end |