Class: CommitFormat::Formatter
- Inherits:
-
Object
- Object
- CommitFormat::Formatter
- Defined in:
- lib/commit_format/formatter.rb
Defined Under Namespace
Classes: Message
Instance Method Summary collapse
- #formatted_commits ⇒ Object
-
#initialize(commits, options = {}) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize(commits, options = {}) ⇒ Formatter
Returns a new instance of Formatter.
5 6 7 8 |
# File 'lib/commit_format/formatter.rb', line 5 def initialize(commits, = {}) @commits = commits @paragraph = [:paragraph] end |
Instance Method Details
#formatted_commits ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/commit_format/formatter.rb', line 10 def formatted_commits @commits.map do |commit| if @paragraph format_commit_as_paragraphs(commit) else format_commit(commit) end end end |