Module: RuboCop::Cop::GemspecHelp

Overview

Common functionality for checking gem declarations.

Instance Method Summary collapse

Instance Method Details

#gem_specification(node) ⇒ Object



20
21
22
23
24
25
26
27
# 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) ⇒ Object



10
11
12
13
14
15
16
17
# 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