Sha256: a072ea37e01a119ccc224f1a08a8ac4068d6e984ff0cb70cbb38a838ae03ef42
Contents?: true
Size: 576 Bytes
Versions: 7
Compression:
Stored size: 576 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Rake module Helper module TaskDefinition extend NodePattern::Macros extend self def_node_matcher :task_or_namespace?, <<-PATTERN (block (send _ {:task :namespace} ...) args _ ) PATTERN def in_task_or_namespace?(node) node.each_ancestor(:block).any? do |a| task_or_namespace?(a) end end end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems