Class: Codeowners::Cli::Wizards::UnrecognizedLineWizard

Inherits:
Object
  • Object
show all
Includes:
InteractiveOps
Defined in:
lib/codeowners/cli/wizards/unrecognized_line_wizard.rb

Overview

Suggests to fix unrecognized lines in the codeowners file. Only returns decision without applying any modifications.

Instance Method Summary collapse

Methods included from InteractiveOps

#ask, #yes?

Instance Method Details

#suggest_fixing(line) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/codeowners/cli/wizards/unrecognized_line_wizard.rb', line 13

def suggest_fixing(line)
  case prompt(line)
  when 'i' then :ignore
  when 'y' then [:replace, keep_asking_until_valid_line]
  when 'd' then :delete
  end
end