Method: RuboCop::AST::BlockNode#first_argument

Defined in:
lib/rubocop/ast/node/block_node.rb

#first_argumentNode?

A shorthand for getting the first argument of this block. Equivalent to arguments.first.

Returns:

  • (Node, nil)

    the first argument of this block, or nil if there are no arguments



31
32
33
# File 'lib/rubocop/ast/node/block_node.rb', line 31

def first_argument
  arguments[0]
end