Class: RuboCop::TargetRuby::Source Private

Inherits:
Object
  • 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.

A place where information about a target ruby version is found.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Source

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.

Returns a new instance of Source.


20
21
22
23
# File 'lib/rubocop/target_ruby.rb', line 20

def initialize(config)
  @config = config
  @version = find_version
end

Instance Attribute Details

#nameObject (readonly)

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.


18
19
20
# File 'lib/rubocop/target_ruby.rb', line 18

def name
  @name
end

#versionObject (readonly)

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.


18
19
20
# File 'lib/rubocop/target_ruby.rb', line 18

def version
  @version
end

Instance Method Details

#to_sObject

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.


25
26
27
# File 'lib/rubocop/target_ruby.rb', line 25

def to_s
  name
end