class RuboCop::Cop::RSpec::AlignRightLetBrace


let(:a) { b }
let(:baz) { bar }
let(:foobar) { blahblah }
# good
let(:a) { b }
let(:baz) { bar }
let(:foobar) { blahblah }
# bad
@example
Checks that right braces for adjacent single line lets are aligned.

def self.autocorrect_incompatible_with

def self.autocorrect_incompatible_with
  [Layout::ExtraSpacing]
end

def autocorrect(let)

def autocorrect(let)
  lambda do |corrector|
    corrector.insert_before(
      let.loc.end,
      token_aligner.indent_for(let)
    )
  end
end

def investigate(_processed_source)

def investigate(_processed_source)
  return if processed_source.blank?
  token_aligner.offending_tokens.each do |let|
    add_offense(let, location: :end)
  end
end

def token_aligner

def token_aligner
  @token_aligner ||=
    RuboCop::RSpec::AlignLetBrace.new(processed_source.ast, :end)
end