Class: RubocopTodoCorrector::Commands::Remove

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop_todo_corrector/commands/remove.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cop_name:, rubocop_todo_path:) ⇒ Remove

Returns a new instance of Remove.



22
23
24
25
26
27
28
# File 'lib/rubocop_todo_corrector/commands/remove.rb', line 22

def initialize(
  cop_name:,
  rubocop_todo_path:
)
  @cop_name = cop_name
  @rubocop_todo_path = rubocop_todo_path
end

Class Method Details

.call(cop_name:, rubocop_todo_path:) ⇒ Object

Parameters:

  • cop_name (String)
  • rubocop_todo_path (String)


11
12
13
14
15
16
17
18
19
# File 'lib/rubocop_todo_corrector/commands/remove.rb', line 11

def call(
  cop_name:,
  rubocop_todo_path:
)
  new(
    cop_name:,
    rubocop_todo_path:
  ).call
end

Instance Method Details

#callString

Returns:

  • (String)


31
32
33
34
# File 'lib/rubocop_todo_corrector/commands/remove.rb', line 31

def call
  check_rubocop_todo_existence
  write
end