Class: RubocopTodoCorrector::Commands::Correct
- Inherits:
-
Object
- Object
- RubocopTodoCorrector::Commands::Correct
- Defined in:
- lib/rubocop_todo_corrector/commands/correct.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(only_safe:, temporary_gemfile_path:) ⇒ Correct
constructor
A new instance of Correct.
Constructor Details
#initialize(only_safe:, temporary_gemfile_path:) ⇒ Correct
Returns a new instance of Correct.
20 21 22 23 24 25 26 |
# File 'lib/rubocop_todo_corrector/commands/correct.rb', line 20 def initialize( only_safe:, temporary_gemfile_path: ) @only_safe = only_safe @temporary_gemfile_path = temporary_gemfile_path end |
Class Method Details
.call(only_safe:, temporary_gemfile_path:) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/rubocop_todo_corrector/commands/correct.rb', line 9 def call( only_safe:, temporary_gemfile_path: ) new( only_safe:, temporary_gemfile_path: ).call end |
Instance Method Details
#call ⇒ Object
28 29 30 31 32 33 |
# File 'lib/rubocop_todo_corrector/commands/correct.rb', line 28 def call ::Kernel.system( { 'BUNDLE_GEMFILE' => @temporary_gemfile_path }, "bundle exec rubocop #{}" ) end |