class RuboCop::Cop::Style::Next
def on_block(node)
def on_block(node) block_owner, _, body = *node return unless block_owner.type == :send return if body.nil? _, method_name = *block_owner return unless enumerator?(method_name) return unless ends_with_condition?(body) add_offense(block_owner, :selector, MSG) end