Module: RuboCop::AST::ParameterizedNode::WrappedArguments
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Included In:
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Instance Chain:
|
|
| Defined in: | lib/rubocop/ast/node/mixin/parameterized_node.rb |
Overview
A specialized ::RuboCop::AST::ParameterizedNode for node that have a single child
containing either nil, an argument, or a begin node with all the
arguments
Instance Attribute Summary
::RuboCop::AST::ParameterizedNode - Included
| #arguments? | Checks whether this node has any arguments. |
| #block_argument? | Whether the last argument of the node is a block pass, i.e. |
| #parenthesized? | Checks whether this node’s arguments are wrapped in parentheses. |
| #rest_argument? | Alias for #splat_argument?. |
| #splat_argument? | Checks whether any argument of the node is a splat argument, i.e. |
Instance Method Summary
::RuboCop::AST::ParameterizedNode - Included
| #first_argument | A shorthand for getting the first argument of the node. |
| #last_argument | A shorthand for getting the last argument of the node. |
Instance Method Details
#arguments ⇒ Array
# File 'lib/rubocop/ast/node/mixin/parameterized_node.rb', line 70
def arguments first = children.first if first&.begin_type? first.children else children end end