Class: Phare::Check::ScssLint

Inherits:
Phare::Check show all
Defined in:
lib/phare/check/scss_lint.rb

Instance Attribute Summary collapse

Attributes inherited from Phare::Check

#status, #tree

Instance Method Summary collapse

Methods inherited from Phare::Check

#run, #should_run?

Constructor Details

#initialize(directory, options = {}) ⇒ ScssLint

Returns a new instance of ScssLint.



7
8
9
10
11
12
13
# File 'lib/phare/check/scss_lint.rb', line 7

def initialize(directory, options = {})
  @path = File.expand_path("#{directory}app/assets/stylesheets", __FILE__)
  @extensions = %w(.scss)
  @options = options

  super
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/phare/check/scss_lint.rb', line 5

def path
  @path
end

Instance Method Details

#commandObject



15
16
17
18
19
20
21
# File 'lib/phare/check/scss_lint.rb', line 15

def command
  if @tree.changed?
    "scss-lint #{files_to_check.join(' ')}"
  else
    "scss-lint #{@path}"
  end
end