class SyntaxSuggest::ScanHistory

Scans up/down from the given block

You can try out a change, stash it, or commit it to save for later

Example:

scanner = ScanHistory.new(code_lines: code_lines, block: block)
scanner.scan(
  up: ->(_, _, _) { true },
  down: ->(_, _, _) { true }
)
scanner.changed? # => true
expect(scanner.lines).to eq(code_lines)

scanner.stash_changes

expect(scanner.lines).to_not eq(code_lines)