Class: CommitFormat::Cli
- Inherits:
-
Object
- Object
- CommitFormat::Cli
- Defined in:
- lib/commit_format/cli.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(args) ⇒ Cli
constructor
A new instance of Cli.
Constructor Details
#initialize(args) ⇒ Cli
Returns a new instance of Cli.
7 8 9 |
# File 'lib/commit_format/cli.rb', line 7 def initialize(args) @args = parse_args(args) end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/commit_format/cli.rb', line 11 def execute parser = Parser.new(@args) commits = parser.commits formatter = Formatter.new( commits, :paragraph => @args.fetch(:paragraph, false) ) formatted_commits = formatter.formatted_commits print_formatted_commits(formatted_commits) end |