Sha256: 818971d97898701a936ce4588b9b55ad8574fc12351dc7b85cede4fbeb7fe6cd
Contents?: true
Size: 665 Bytes
Versions: 17
Compression:
Stored size: 665 Bytes
Contents
class Standard::CreatesConfigStore class SetsTargetRubyVersion def call(options_config, standard_config) options_config["AllCops"]["TargetRubyVersion"] = floatify_version( max_rubocop_supported_version(standard_config[:ruby_version]) ) end private def max_rubocop_supported_version(desired_version) rubocop_supported_version = Gem::Version.new("2.3") if desired_version < rubocop_supported_version rubocop_supported_version else desired_version end end def floatify_version(version) major, minor = version.segments "#{major}.#{minor}".to_f # lol end end end
Version data entries
17 entries across 17 versions & 1 rubygems