123456789_123456789_123456789_123456789_123456789_

Module: RuboCop::Cop::GemspecHelp

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Macros
Defined in: lib/rubocop/cop/mixin/gemspec_help.rb

Overview

Common functionality for checking gem declarations.

Instance Method Summary

Instance Method Details

#gem_specification(node)

[ GitHub ]

  
# File 'lib/rubocop/cop/mixin/gemspec_help.rb', line 20

def_node_search :gem_specification, <<~PATTERN
  (block
    (send
      (const
        (const {cbase nil?} :Gem) :Specification) :new)
    (args
      (arg $_)) ...)
PATTERN

#gem_specification?(node)

[ GitHub ]

  
# File 'lib/rubocop/cop/mixin/gemspec_help.rb', line 10

def_node_matcher :gem_specification?, <<~PATTERN
  (block
    (send
      (const
        (const {cbase nil?} :Gem) :Specification) :new)
    (args
      (arg $_)) ...)
PATTERN