Class: GitWakaTime::CommitedFile
- Inherits:
-
Sequel::Model
- Object
- Sequel::Model
- GitWakaTime::CommitedFile
- Defined in:
- lib/gitwakatime/commited_file.rb
Overview
Determines When a file was lasted commit and stores time and hash.
Instance Method Summary collapse
-
#before_create ⇒ Object
No two committed files should have the same name + dependent_date this means a split tree, and we should split time between the two, or more, commits.
- #to_s ⇒ Object
Instance Method Details
#before_create ⇒ Object
No two committed files should have the same name + dependent_date this means a split tree, and we should split time between the two, or more, commits.
10 11 12 |
# File 'lib/gitwakatime/commited_file.rb', line 10 def before_create find_dependent_commit(name) if GitWakaTime.config.git end |
#to_s ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/gitwakatime/commited_file.rb', line 14 def to_s format(' %-20s %-40s %-100s '.blue, (dependent_sha[0..8] if dependent_sha), ChronicDuration.output(time_in_seconds.to_f), name ) end |