class Bundler::LockfileParser::Position - bundler: Ruby Standard Library Documentation

# 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 9
    def initialize(line, column)
      @line = line
      @column = column
    end

### Public Instance Methods

advance!(string) click to toggle source

    # File bundler/lockfile_parser.rb, line 14
    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 24
    def to_s
      "#{line}:#{column}"
    end