Files
news.gitea.happylizard.me/bin/gems/sass-embedded-1.104.1-x86_64-linux-gnu/lib/sass/logger/source_span.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

29 lines
825 B
Ruby

# frozen_string_literal: true
module Sass
module Logger
# A span of text within a source file.
#
# @see https://sass-lang.com/documentation/js-api/interfaces/sourcespan/
class SourceSpan
# @return [SourceLocation]
attr_reader :start, :end
# @return [String]
attr_reader :text
# @return [String, nil]
attr_reader :url, :context
# @!visibility private
def initialize(source_span)
@start = source_span.start.nil? ? nil : Logger::SourceLocation.new(source_span.start)
@end = source_span.end.nil? ? nil : Logger::SourceLocation.new(source_span.end)
@text = source_span.text
@url = source_span.url == '' ? nil : source_span.url
@context = source_span.context == '' ? nil : source_span.context
end
end
end
end