Class: RuboCop::Migration::ConfigLoader

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

Overview

Merge default RuboCop config with plugin config.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:) ⇒ ConfigLoader

Returns a new instance of ConfigLoader.

Parameters:

  • path (String)


18
19
20
# File 'lib/rubocop/migration/config_loader.rb', line 18

def initialize(path:)
  @path = path
end

Class Method Details

.call(path:) ⇒ RuboCop::Config

Parameters:

  • path (String)

Returns:

  • (RuboCop::Config)


12
13
14
# File 'lib/rubocop/migration/config_loader.rb', line 12

def call(path:)
  new(path: path).call
end

Instance Method Details

#callRuboCop::Config

Returns:

  • (RuboCop::Config)


23
24
25
26
27
28
# File 'lib/rubocop/migration/config_loader.rb', line 23

def call
  ::RuboCop::ConfigLoader.merge_with_default(
    plugin_config,
    @path
  )
end