Class: RuboCop::TargetRuby::Source

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Source

Returns a new instance of Source.



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

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



16
17
18
# File 'lib/rubocop/target_ruby.rb', line 16

def name
  @name
end

#versionObject (readonly)

Returns the value of attribute version.



16
17
18
# File 'lib/rubocop/target_ruby.rb', line 16

def version
  @version
end

Instance Method Details

#to_sObject



23
24
25
# File 'lib/rubocop/target_ruby.rb', line 23

def to_s
  name
end