class RuboCop::Cop::InternalAffairs::NodeDestructuring
method_name = send_node.method_name
# good
_receiver, method_name, _arguments = *send_node
# bad
_receiver, method_name, _arguments = send_node.children
# bad
@example Using splat expansion
Checks that node destructuring is using the node extensions.
def node_suffix?(method_name)
def node_suffix?(method_name) method_name.to_s.end_with?('node') end
def on_masgn(node)
def on_masgn(node) node_destructuring?(node) { add_offense(node) } end