Class: Sass::Source::Range
- Inherits:
-
Object
- Object
- Sass::Source::Range
- Defined in:
- .ruby-sass/lib/sass/source/range.rb
Instance Attribute Summary (collapse)
-
#end_pos ⇒ Sass::Source::Position
The ending position of the range in the document (exclusive).
-
#file ⇒ String
The file in which this source range appears.
-
#importer ⇒ Sass::Importers::Base
The importer that imported the file in which this source range appears.
-
#start_pos ⇒ Sass::Source::Position
The starting position of the range in the document (inclusive).
Instance Method Summary (collapse)
-
#initialize(start_pos, end_pos, file, importer = nil) ⇒ Range
constructor
A new instance of Range.
-
#inspect ⇒ String
A string representation of the source range.
Constructor Details
#initialize(start_pos, end_pos, file, importer = nil) ⇒ Range
Returns a new instance of Range
29 30 31 32 33 34 |
# File '.ruby-sass/lib/sass/source/range.rb', line 29 def initialize(start_pos, end_pos, file, importer = nil) @start_pos = start_pos @end_pos = end_pos @file = file @importer = importer end |
Constructor Details
#initialize(start_pos, end_pos, file, importer = nil) ⇒ Range
Returns a new instance of Range
29 30 31 32 33 34 |
# File '.ruby-sass/lib/sass/source/range.rb', line 29 def initialize(start_pos, end_pos, file, importer = nil) @start_pos = start_pos @end_pos = end_pos @file = file @importer = importer end |
Instance Attribute Details
#end_pos ⇒ Sass::Source::Position
The ending position of the range in the document (exclusive).
11 12 13 |
# File '.ruby-sass/lib/sass/source/range.rb', line 11 def end_pos @end_pos end |
#file ⇒ String
The file in which this source range appears. This can be nil if the file is unknown or not yet generated.
17 18 19 |
# File '.ruby-sass/lib/sass/source/range.rb', line 17 def file @file end |
#importer ⇒ Sass::Importers::Base
The importer that imported the file in which this source range appears. This is nil for target ranges.
23 24 25 |
# File '.ruby-sass/lib/sass/source/range.rb', line 23 def importer @importer end |
#start_pos ⇒ Sass::Source::Position
The starting position of the range in the document (inclusive).
6 7 8 |
# File '.ruby-sass/lib/sass/source/range.rb', line 6 def start_pos @start_pos end |
Instance Method Details
#inspect ⇒ String
Returns A string representation of the source range.
37 38 39 |
# File '.ruby-sass/lib/sass/source/range.rb', line 37 def inspect "(#{start_pos.inspect} to #{end_pos.inspect}#{" in #{@file}" if @file})" end |