Class: Commitlint::Cli
- Inherits:
-
Object
- Object
- Commitlint::Cli
- Defined in:
- lib/commitlint/cli.rb
Overview
Cli class is responsible for handling command line arguments
Constant Summary collapse
- BANNER =
<<~HELP.freeze Commintlint v#{Commitlint::VERSION} - A CLI tool to lint commit messages with Conventional Commits. Usage: commitlint --message [commit_message | filepath] Examples: commitlint --message "feat: add new feature" commitlint --message "./path/to/commit_msg" commitlint --message ".git/COMMIT_EDITMSG" Options: HELP
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Cli
constructor
A new instance of Cli.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ Cli
Returns a new instance of Cli.
21 22 23 24 25 26 27 |
# File 'lib/commitlint/cli.rb', line 21 def initialize(argv) @argv = argv @options = { message: nil, quiet: false } end |
Class Method Details
.start(argv) ⇒ Object
29 30 31 |
# File 'lib/commitlint/cli.rb', line 29 def self.start(argv) new(argv).run end |