Class: RuboCop::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop/options.rb

Overview

This class handles command line options.

Constant Summary collapse

DEFAULT_FORMATTER =
'progress'
EXITING_OPTIONS =
[:version, :verbose_version, :show_cops]

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



58
59
60
# File 'lib/rubocop/options.rb', line 58

def initialize
  @options = {}
end

Instance Method Details

#parse(args) ⇒ Object



62
63
64
65
66
67
68
69
70
71
# File 'lib/rubocop/options.rb', line 62

def parse(args)
  ignore_dropped_options(args)
  convert_deprecated_options(args)

  define_options(args).parse!(args)

  validate_compatibility

  [@options, args]
end