lib/rubocop/cop/metrics/utils/iterating_block.rb
# Returns the name of the method called with a block
# if node is a block node, or a block-pass node.
Returns the name of the method called with a block
if node is a block node, or a block-pass node.
Returns the name of the method called with a block if node is a block node or a block - pass node .
def block_method_name(node)
            case node.type
            when :block
              node.method_name
            when :block_pass
              node.parent.method_name
            end
          end
def block_method_name ( node ) case node . type when :block node . method_name when :block_pass node . parent . method_name end end
Returns the name of the method called with a block
if node is a block node, or a block-pass node.
Returns the name of the method called with a block if node is a block node or a block - pass node .
node
<not_specific>