class Sass::Source::Position
def after(str)
-
(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)
-
offset
(Integer
) -- The source offset -
line
(Integer
) -- The source line
def initialize(line, offset) @line = line @offset = offset end
def inspect
-
(String)
- A string representation of the source position.
def inspect "#{line.inspect}:#{offset.inspect}" end