Class: QuietQuality::Cli::Entrypoint
- Inherits:
-
Object
- Object
- QuietQuality::Cli::Entrypoint
- Includes:
- Logging
- Defined in:
- lib/quiet_quality/cli/entrypoint.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(argv:, output_stream: $stdout, error_stream: $stderr) ⇒ Entrypoint
constructor
A new instance of Entrypoint.
- #successful? ⇒ Boolean
Methods included from Logging
Constructor Details
#initialize(argv:, output_stream: $stdout, error_stream: $stderr) ⇒ Entrypoint
Returns a new instance of Entrypoint.
6 7 8 9 10 |
# File 'lib/quiet_quality/cli/entrypoint.rb', line 6 def initialize(argv:, output_stream: $stdout, error_stream: $stderr) @argv = argv @output_stream = output_stream @error_stream = error_stream end |
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/quiet_quality/cli/entrypoint.rb', line 12 def execute if helping? log_help_text elsif printing_version? log_version_text elsif no_tools? log_no_tools_text else execute! log_results end self end |
#successful? ⇒ Boolean
29 30 31 32 33 |
# File 'lib/quiet_quality/cli/entrypoint.rb', line 29 def successful? return true if helping? || printing_version? return false if no_tools? !executed.any_failure? end |