Class: RuboCop::TargetRuby::GemspecFile Private
- Extended by:
- Macros
- 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 .gemspec file.
Constant Summary collapse
- GEMSPEC_EXTENSION =
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.
'.gemspec'
Instance Attribute Summary
Attributes inherited from Source
Instance Method Summary collapse
- #gem_requirement_versions(node) ⇒ Object
- #name ⇒ Object private
- #required_ruby_version(node) ⇒ Object
Methods inherited from Source
Constructor Details
This class inherits a constructor from RuboCop::TargetRuby::Source
Instance Method Details
#gem_requirement_versions(node) ⇒ Object
159 160 161 162 163 |
# File 'lib/rubocop/target_ruby.rb', line 159 def_node_matcher :gem_requirement_versions, <<~PATTERN (send (const(const _ :Gem):Requirement) :new {$str+ | (send $str :freeze)+ | (array $str+) | (array (send $str :freeze)+)} ) PATTERN |
#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.
165 166 167 |
# File 'lib/rubocop/target_ruby.rb', line 165 def name "`required_ruby_version` parameter (in #{gemspec_filename})" end |
#required_ruby_version(node) ⇒ Object
154 155 156 |
# File 'lib/rubocop/target_ruby.rb', line 154 def_node_search :required_ruby_version, <<~PATTERN (send _ :required_ruby_version= $_) PATTERN |