Class: Rails::CssUnused::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/css_unused/configuration.rb

Constant Summary collapse

VIEW_EXTENSIONS =
%w[.html.erb .html.haml .haml .erb .slim .jbuilder].freeze
COMPONENT_EXTENSIONS =
%w[.html.erb .html.haml .haml .erb .slim].freeze
CSS_EXTENSIONS =
%w[.css .scss .sass].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/rails/css_unused/configuration.rb', line 17

def initialize
  @view_paths = ["app/views"]
  @component_paths = ["app/components"]
  @stylesheet_paths = ["app/assets/stylesheets", "app/assets/builds"]
  @javascript_paths = ["app/javascript"]
  @ignore_classes = %w[
    clearfix
    sr-only
    visually-hidden
  ]
  @ignore_selectors_matching = []
end

Instance Attribute Details

#component_pathsObject

Returns the value of attribute component_paths.



10
11
12
# File 'lib/rails/css_unused/configuration.rb', line 10

def component_paths
  @component_paths
end

#ignore_classesObject

Returns the value of attribute ignore_classes.



10
11
12
# File 'lib/rails/css_unused/configuration.rb', line 10

def ignore_classes
  @ignore_classes
end

#ignore_selectors_matchingObject

Returns the value of attribute ignore_selectors_matching.



10
11
12
# File 'lib/rails/css_unused/configuration.rb', line 10

def ignore_selectors_matching
  @ignore_selectors_matching
end

#javascript_pathsObject

Returns the value of attribute javascript_paths.



10
11
12
# File 'lib/rails/css_unused/configuration.rb', line 10

def javascript_paths
  @javascript_paths
end

#stylesheet_pathsObject

Returns the value of attribute stylesheet_paths.



10
11
12
# File 'lib/rails/css_unused/configuration.rb', line 10

def stylesheet_paths
  @stylesheet_paths
end

#view_pathsObject

Returns the value of attribute view_paths.



10
11
12
# File 'lib/rails/css_unused/configuration.rb', line 10

def view_paths
  @view_paths
end