Class: RubocopTodoCorrector::Commands::Generate
- Inherits:
-
Object
- Object
- RubocopTodoCorrector::Commands::Generate
- Defined in:
- lib/rubocop_todo_corrector/commands/generate.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(rubocop_todo_path:, temporary_gemfile_path:) ⇒ Generate
constructor
A new instance of Generate.
Constructor Details
#initialize(rubocop_todo_path:, temporary_gemfile_path:) ⇒ Generate
Returns a new instance of Generate.
22 23 24 25 26 27 28 |
# File 'lib/rubocop_todo_corrector/commands/generate.rb', line 22 def initialize( rubocop_todo_path:, temporary_gemfile_path: ) @rubocop_todo_path = rubocop_todo_path @temporary_gemfile_path = temporary_gemfile_path end |
Class Method Details
.call(rubocop_todo_path:, temporary_gemfile_path:) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/rubocop_todo_corrector/commands/generate.rb', line 11 def call( rubocop_todo_path:, temporary_gemfile_path: ) new( rubocop_todo_path:, temporary_gemfile_path: ).call end |
Instance Method Details
#call ⇒ Object
30 31 32 33 34 35 |
# File 'lib/rubocop_todo_corrector/commands/generate.rb', line 30 def call ::Kernel.system( { 'BUNDLE_GEMFILE' => @temporary_gemfile_path }, 'bundle exec rubocop --regenerate-todo' ) end |