lib/scss_lint/engine.rb in scss-lint-0.6.7 vs lib/scss_lint/engine.rb in scss-lint-0.7.0
- old
+ new
@@ -2,13 +2,14 @@
module SCSSLint
class Engine
ENGINE_OPTIONS = { cache: false, syntax: :scss }
- attr_reader :contents, :lines, :tree
+ attr_reader :contents, :filename, :lines, :tree
def initialize(scss_or_filename)
if File.exists?(scss_or_filename)
+ @filename = scss_or_filename
@engine = Sass::Engine.for_file(scss_or_filename, ENGINE_OPTIONS)
@contents = File.open(scss_or_filename, 'r').read
else
@engine = Sass::Engine.new(scss_or_filename, ENGINE_OPTIONS)
@contents = scss_or_filename