Class: Standard::CreatesConfigStore::SetsTargetRubyVersion

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

Constant Summary collapse

MIN_TARGET_RUBY_VERSION =

This is minimum version that Rubocop can parse, not the minimum version it can run on (e.g. TargetRubyVersion). See the following for more details:

docs.rubocop.org/rubocop/configuration.html#setting-the-target-ruby-version

github.com/rubocop/rubocop/blob/master/lib/rubocop/target_ruby.rb

"2.0"

Instance Method Summary collapse

Instance Method Details

#call(options_config, standard_config) ⇒ Object



12
13
14
15
16
# File 'lib/standard/creates_config_store/sets_target_ruby_version.rb', line 12

def call(options_config, standard_config)
  options_config["AllCops"]["TargetRubyVersion"] = normalize_version(
    min_target_ruby_version_supported(standard_config[:ruby_version])
  )
end