Class: RuboCop::TargetRuby::GemspecFile Private

Inherits:
Source
  • Object
show all
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

#version

Instance Method Summary collapse

Methods inherited from Source

#initialize, #to_s

Constructor Details

This class inherits a constructor from RuboCop::TargetRuby::Source

Instance Method Details

#gem_requirement?(node) ⇒ Object



156
157
158
# File 'lib/rubocop/target_ruby.rb', line 156

def_node_matcher :gem_requirement?, "(send (const(const _ :Gem):Requirement) :new $str)\n"

#nameObject

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.



160
161
162
# File 'lib/rubocop/target_ruby.rb', line 160

def name
  "`required_ruby_version` parameter (in #{gemspec_filename})"
end

#required_ruby_version(node) ⇒ Object



151
152
153
# File 'lib/rubocop/target_ruby.rb', line 151

def_node_search :required_ruby_version, "(send _ :required_ruby_version= $_)\n"