class Bundler::LockfileParser::Position

Attributes

column[R]
line[R]

Public Class Methods

new(line, column) click to toggle source
# File bundler/lockfile_parser.rb, line 7
def initialize(line, column)
  @line = line
  @column = column
end

Public Instance Methods

advance!(string) click to toggle source
# File bundler/lockfile_parser.rb, line 12
def advance!(string)
  lines = string.count("\n")
  if lines > 0
    @line += lines
    @column = string.length - string.rindex("\n")
  else
    @column += string.length
  end
end
to_s() click to toggle source
# File bundler/lockfile_parser.rb, line 22
def to_s
  "#{line}:#{column}"
end