Class: RuboCop::TargetRuby::ToolVersionsFile Private
- Inherits:
-
RubyVersionFile
- Object
- Source
- RubyVersionFile
- RuboCop::TargetRuby::ToolVersionsFile
- 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 .tool-versions file, in a line starting with ‘ruby`.
Constant Summary collapse
- TOOL_VERSIONS_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.
'.tool-versions'
- TOOL_VERSIONS_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.
/^(?:ruby )(?<version>\d+\.\d+)/.freeze
Constants inherited from RubyVersionFile
RubyVersionFile::RUBY_VERSION_FILENAME, RubyVersionFile::RUBY_VERSION_PATTERN
Instance Attribute Summary
Attributes inherited from Source
Instance Method Summary collapse
- #name ⇒ Object private
Methods inherited from Source
Constructor Details
This class inherits a constructor from RuboCop::TargetRuby::Source
Instance Method Details
#name ⇒ Object
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.
174 175 176 |
# File 'lib/rubocop/target_ruby.rb', line 174 def name "`#{TOOL_VERSIONS_FILENAME}`" end |