Class: Evilution::CLI::Commands::Run Private
- Inherits:
-
Evilution::CLI::Command
- Object
- Evilution::CLI::Command
- Evilution::CLI::Commands::Run
- Defined in:
- lib/evilution/cli/commands/run.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #call ⇒ Object private
Methods inherited from Evilution::CLI::Command
Constructor Details
This class inherits a constructor from Evilution::CLI::Command
Instance Method Details
#call ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/evilution/cli/commands/run.rb', line 16 def call = Evilution::Config. config = nil raise Evilution::ConfigError, @stdin_error if @stdin_error config = Evilution::Config.new(**@options, target_files: @files, line_ranges: @line_ranges) hooks = build_hooks(config) runner = Evilution::Runner.new(config: config, hooks: hooks) summary = runner.call exit_code = summary.success?(min_score: config.min_score) ? 0 : 1 Evilution::CLI::Result.new(exit_code: exit_code) rescue Evilution::Error => e handle_error(e, config, ) end |