Class: Less::Engine
- Inherits:
-
Object
- Object
- Less::Engine
- Defined in:
- lib/sass/less.rb
Overview
The entry point to Less. By default Less doesn't preserve the filename of the file being parsed, which is unpleasant for error reporting. Our monkeypatch keeps it around.
Instance Method Summary collapse
- #initialize_with_sass(obj, opts = {}) (also: #initialize)
- #parse_with_sass (also: #parse)
Instance Method Details
#initialize_with_sass(obj, opts = {}) Also known as: initialize
346 347 348 349 |
# File 'lib/sass/less.rb', line 346
def initialize_with_sass(obj, opts = {})
initialize_without_sass(obj, opts)
@filename = obj.path if obj.is_a?(File)
end
|
#parse_with_sass Also known as: parse
353 354 355 356 357 358 |
# File 'lib/sass/less.rb', line 353
def parse_with_sass
parse_without_sass
rescue Sass::SyntaxError => e
e.modify_backtrace(:filename => @filename)
raise e
end
|