class Sass::Source::Position

def after(str)

Returns:
  • (Position) - The source position after proceeding forward through

Parameters:
  • str (String) -- The string to move through.
def after(str)
  newlines = str.count("\n")
  Position.new(line + newlines,
    if newlines == 0
      offset + str.length
    else
      str.length - str.rindex("\n") - 1
    end)
end

def initialize(line, offset)

Parameters:
  • offset (Integer) -- The source offset
  • line (Integer) -- The source line
def initialize(line, offset)
  @line = line
  @offset = offset
end

def inspect

Returns:
  • (String) - A string representation of the source position.
def inspect
  "#{line.inspect}:#{offset.inspect}"
end