lib/rubocop/cop/autocorrect_logic.rb
# Expand the given range to include all of any lines it covers. Does not
# include newline at end of the last line.
Expand the given range to include all of any lines it covers. Does not
include newline at end of the last line.
Expand the given range to include all of any lines it covers . Does not include newline at end of the last line .
def range_by_lines(range)
        begin_of_first_line = range.begin_pos - range.column
        last_line = range.source_buffer.source_line(range.last_line)
        last_line_offset = last_line.length - range.last_column
        end_of_last_line = range.end_pos + last_line_offset
        Parser::Source::Range.new(range.source_buffer,
                                  begin_of_first_line,
                                  end_of_last_line)
      end
def range_by_lines ( range ) begin_of_first_line = range . begin_pos - range . column last_line = range . source_buffer . source_line ( range . last_line ) last_line_offset = last_line . length - range . last_column end_of_last_line = range . end_pos + last_line_offset Parser :: Source :: Range . new ( range . source_buffer , begin_of_first_line , end_of_last_line ) end
Expand the given range to include all of any lines it covers.
Expand the given range to include all of any lines it covers .
range
<not_specific>