Class: RuboCop::TargetRuby::Source
- Inherits:
-
Object
- Object
- RuboCop::TargetRuby::Source
- Defined in:
- lib/rubocop/target_ruby.rb
Overview
A place where information about a target ruby version is found.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(config) ⇒ Source
constructor
A new instance of Source.
- #to_s ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/rubocop/target_ruby.rb', line 16 def name @name end |
#version ⇒ Object (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_s ⇒ Object
23 24 25 |
# File 'lib/rubocop/target_ruby.rb', line 23 def to_s name end |