Class: Standard::CreatesConfigStore

Inherits:
Object
  • Object
show all
Defined in:
lib/standard/creates_config_store.rb,
lib/standard/creates_config_store/assigns_rubocop_yaml.rb,
lib/standard/creates_config_store/configures_ignored_paths.rb,
lib/standard/creates_config_store/sets_target_ruby_version.rb

Defined Under Namespace

Classes: AssignsRubocopYaml, ConfiguresIgnoredPaths, SetsTargetRubyVersion

Instance Method Summary collapse

Constructor Details

#initializeCreatesConfigStore

Returns a new instance of CreatesConfigStore.


9
10
11
12
13
# File 'lib/standard/creates_config_store.rb', line 9

def initialize
  @assigns_rubocop_yaml = AssignsRubocopYaml.new
  @sets_target_ruby_version = SetsTargetRubyVersion.new
  @configures_ignored_paths = ConfiguresIgnoredPaths.new
end

Instance Method Details

#call(standard_config) ⇒ Object


15
16
17
18
19
20
21
# File 'lib/standard/creates_config_store.rb', line 15

def call(standard_config)
  RuboCop::ConfigStore.new.tap do |config_store|
    options_config = @assigns_rubocop_yaml.call(config_store, standard_config)
    @sets_target_ruby_version.call(options_config, standard_config)
    @configures_ignored_paths.call(options_config, standard_config)
  end
end