Module: RuboCop::Cop::Rake::Helper::TaskDefinition

Extended by:
NodePattern::Macros, TaskDefinition
Included in:
TaskDefinition
Defined in:
lib/rubocop/cop/rake/helper/task_definition.rb

Instance Method Summary collapse

Instance Method Details

#in_task_or_namespace?(node) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
22
23
# File 'lib/rubocop/cop/rake/helper/task_definition.rb', line 19

def in_task_or_namespace?(node)
  node.each_ancestor(:block).any? do |a|
    task_or_namespace?(a)
  end
end