Class: Bundler::LockfileParser::Position
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/bundler/lockfile_parser.rb |
Class Method Summary
- .new(line, column) ⇒ Position constructor
Instance Attribute Summary
Instance Method Summary
Constructor Details
.new(line, column) ⇒ Position
Instance Attribute Details
#column (readonly)
[ GitHub ]# File 'lib/bundler/lockfile_parser.rb', line 6
attr_reader :line, :column
#line (readonly)
[ GitHub ]# File 'lib/bundler/lockfile_parser.rb', line 6
attr_reader :line, :column
Instance Method Details
#advance!(string)
[ GitHub ]# File 'lib/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