Skip to content

Commit

Permalink
Fix Rubocop lints in Engine class
Browse files Browse the repository at this point in the history
Change-Id: Ib6135d18727a078277810f78ecfc516085e1362d
Reviewed-on: http://gerrit.causes.com/36708
Tested-by: jenkins <[email protected]>
Reviewed-by: Shane da Silva <[email protected]>
  • Loading branch information
sds authored and Shane da Silva committed Mar 29, 2014
1 parent 40d97ae commit 9c94177
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/scss_lint/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Engine
attr_reader :contents, :filename, :lines, :tree

def initialize(scss_or_filename)
if File.exists?(scss_or_filename)
if File.exist?(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
Expand All @@ -26,7 +26,7 @@ def initialize(scss_or_filename)
if error.is_a?(Encoding::UndefinedConversionError) ||
error.message.include?('invalid byte sequence')
raise FileEncodingError,
"Unable to parse SCSS file: #{error.to_s}",
"Unable to parse SCSS file: #{error}",
error.backtrace
else
raise
Expand Down

0 comments on commit 9c94177

Please sign in to comment.