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
365 366 367 368 |
# File 'lib/sass/less.rb', line 365
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
372 373 374 375 376 377 |
# File 'lib/sass/less.rb', line 372
def parse_with_sass
parse_without_sass
rescue Sass::SyntaxError => e
e.modify_backtrace(:filename => @filename)
raise e
end
|