class RuboCop::Cop::RSpec::ScatteredLet
def check_let_declarations(body)
def check_let_declarations(body) lets = body.each_child_node.select { |node| let?(node) } first_let = lets.first lets.each_with_index do |node, idx| next if node.sibling_index == first_let.sibling_index + idx add_offense(node) do |corrector| RuboCop::RSpec::Corrector::MoveNode.new( node, corrector, processed_source ).move_after(first_let) end end end