Class: RuboCop::TargetRuby Private
    Do not use.  This class is for internal use only.
  
| Relationships & Source Files | |
| Namespace Children | |
| Classes: | |
| Inherits: | Object | 
| Defined in: | lib/rubocop/target_ruby.rb | 
Overview
The kind of Ruby that code inspected by RuboCop is written in.
Constant Summary
- 
    DEFAULT_VERSION =
    
 # File 'lib/rubocop/target_ruby.rb', line 82.7
- 
    KNOWN_RUBIES =
    private
    
 # File 'lib/rubocop/target_ruby.rb', line 7[2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5].freeze 
- 
    OBSOLETE_RUBIES =
    private
    
 # File 'lib/rubocop/target_ruby.rb', line 10{ 1.9 => '0.41', 2.0 => '0.50', 2.1 => '0.57', 2.2 => '0.68', 2.3 => '0.81', 2.4 => '1.12', 2.5 => '1.28', 2.6 => '1.50' }.freeze
- 
    SOURCES =
    private
    
 # File 'lib/rubocop/target_ruby.rb', line 271[ RuboCopEnvVar, RuboCopConfig, GemspecFile, RubyVersionFile, ToolVersionsFile, BundlerLockFile, Default ].freeze 
Class Method Summary
- .new(config) ⇒ TargetRuby constructor Internal use only
- .supported_versions Internal use only
Instance Attribute Summary
- #supported? ⇒ Boolean readonly Internal use only
Instance Method Summary
- #rubocop_version_with_support Internal use only
- #source Internal use only
- #version Internal use only
Class Method Details
.supported_versions
[ GitHub ]# File 'lib/rubocop/target_ruby.rb', line 267
def self.supported_versions KNOWN_RUBIES end
Instance Attribute Details
    #supported?  ⇒ Boolean  (readonly)
  
# File 'lib/rubocop/target_ruby.rb', line 294
def supported? KNOWN_RUBIES.include?(version) end
Instance Method Details
#rubocop_version_with_support
[ GitHub ]# File 'lib/rubocop/target_ruby.rb', line 298
def rubocop_version_with_support if supported? RuboCop::Version::STRING else OBSOLETE_RUBIES[version] end end
#source
[ GitHub ]#version
[ GitHub ]# File 'lib/rubocop/target_ruby.rb', line 290
def version source.version end