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, "(block\n  (send\n    (const\n      (const {cbase nil?} :Gem) :Specification) :new)\n  (args\n    (arg $_)) ...)\n"

#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?, "(block\n  (send\n    (const\n      (const {cbase nil?} :Gem) :Specification) :new)\n  (args\n    (arg $_)) ...)\n"