Class: RuboCop::TargetRuby::RubyVersionFile Private

Inherits:
Source
  • Object
show all
Defined in:
lib/rubocop/target_ruby.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

The target ruby version may be found in a .ruby-version file.

Direct Known Subclasses

ToolVersionsFile

Constant Summary collapse

RUBY_VERSION_FILENAME =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'.ruby-version'
RUBY_VERSION_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

/\A(?:ruby-)?(?<version>\d+\.\d+)/.freeze

Instance Attribute Summary

Attributes inherited from Source

#version

Instance Method Summary collapse

Methods inherited from Source

#initialize, #to_s

Constructor Details

This class inherits a constructor from RuboCop::TargetRuby::Source

Instance Method Details

#nameObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



141
142
143
# File 'lib/rubocop/target_ruby.rb', line 141

def name
  "`#{RUBY_VERSION_FILENAME}`"
end