Class: RuboCop::Gusto::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/rubocop/gusto/cli.rb

Instance Method Summary collapse

Instance Method Details

#sort(rubocop_yml_path = ".rubocop.yml") ⇒ Object



14
15
16
17
18
19
# File 'lib/rubocop/gusto/cli.rb', line 14

def sort(rubocop_yml_path = ".rubocop.yml")
  say "Sorting #{rubocop_yml_path}..."
  output_path = options[:output] || rubocop_yml_path
  ConfigYml.load_file(rubocop_yml_path).sort!.write(output_path)
  say "Done! #{output_path} sorted."
end