vendor/gems/diff-lcs-1.1.2/lib/diff/lcs/hunk.rb
# Generate a range of item numbers to print. Only print 1 number if the
# range has only one item in it. Otherwise, it's 'start,end'
Generate a range of item numbers to print. Only print 1 number if the
range has only one item in it. Otherwise, it's 'start,end'
Generate a range of item numbers to print . Only print 1 number if the range has only one item in it . Otherwise it ' s ' start end '
def context_range(mode)
    case mode
    when :old
      s, e = (@start_old + 1), (@end_old + 1)
    when :new
      s, e = (@start_new + 1), (@end_new + 1)
    end
    (s < e) ? "#{s},#{e}" : "#{e}"
  end
def context_range ( mode ) case mode when :old s , e = ( @start_old + 1 ) , ( @end_old + 1 ) when :new s , e = ( @start_new + 1 ) , ( @end_new + 1 ) end ( s < e ) ? "#{s},#{e}" : "#{e}" end
Generate a range of item numbers to print.
Generate a range of item numbers to print .
mode