Class: CommitFormatter
- Inherits:
-
Object
- Object
- CommitFormatter
- Defined in:
- lib/changelogger/commit_formatter.rb
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(commit) ⇒ CommitFormatter
constructor
A new instance of CommitFormatter.
Constructor Details
#initialize(commit) ⇒ CommitFormatter
Returns a new instance of CommitFormatter.
4 5 6 |
# File 'lib/changelogger/commit_formatter.rb', line 4 def initialize(commit) @commit = commit end |
Instance Method Details
#format ⇒ Object
8 9 10 11 12 13 |
# File 'lib/changelogger/commit_formatter.rb', line 8 def format " - " + @commit.committed_date.strftime("%Y/%m/%d: ") + @commit..split(/\n/).first + " (" + @commit..name + ")" end |