123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::TargetRuby::ToolVersionsFile Private

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: RuboCop::TargetRuby::RubyVersionFile
Defined in: lib/rubocop/target_ruby.rb

Overview

The target ruby version may be found in a .tool-versions file, in a line starting with ruby.

Class Method Summary

Source - Inherited

Instance Attribute Summary

Source - Inherited

Instance Method Summary

RubyVersionFile - Inherited

Source - Inherited

Instance Method Details

#filename (private)

[ GitHub ]

  
# File 'lib/rubocop/target_ruby.rb', line 195

def filename
  '.tool-versions'
end

#pattern (private)

[ GitHub ]

  
# File 'lib/rubocop/target_ruby.rb', line 199

def pattern
  /^(?:ruby )(?<version>\d+\.\d+)/.freeze
end