Class: Standard::MergesSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/standard/merges_settings.rb

Defined Under Namespace

Classes: Settings

Instance Method Summary collapse

Instance Method Details

#call(argv, standard_yaml) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/standard/merges_settings.rb', line 7

def call(argv, standard_yaml)
  standard_argv, rubocop_argv = separate_argv(argv)
  standard_cli_flags = parse_standard_argv(standard_argv)
  rubocop_cli_flags, lint_paths = RuboCop::Options.new.parse(rubocop_argv)

  Settings.new(
    determine_command(standard_argv),
    merge(standard_yaml, standard_cli_flags, without_banned(rubocop_cli_flags)),
    lint_paths
  )
end