Class: HtmlScssClassChecker::ClassChecker
- Inherits:
-
Object
- Object
- HtmlScssClassChecker::ClassChecker
- Defined in:
- lib/html_scss_class_checker/class_checker.rb
Instance Attribute Summary collapse
-
#file_class_mapping ⇒ Object
readonly
Returns the value of attribute file_class_mapping.
-
#unmatched_classes ⇒ Object
readonly
Returns the value of attribute unmatched_classes.
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(config) ⇒ ClassChecker
constructor
A new instance of ClassChecker.
Constructor Details
#initialize(config) ⇒ ClassChecker
Returns a new instance of ClassChecker.
8 9 10 11 12 13 14 |
# File 'lib/html_scss_class_checker/class_checker.rb', line 8 def initialize(config) @known_classes = Set.new(config['known_classes']) @html_directories = config['html_directories'] @scss_directories = config['scss_directories'] @unmatched_classes = Set.new @file_class_mapping = {} end |
Instance Attribute Details
#file_class_mapping ⇒ Object (readonly)
Returns the value of attribute file_class_mapping.
6 7 8 |
# File 'lib/html_scss_class_checker/class_checker.rb', line 6 def file_class_mapping @file_class_mapping end |
#unmatched_classes ⇒ Object (readonly)
Returns the value of attribute unmatched_classes.
6 7 8 |
# File 'lib/html_scss_class_checker/class_checker.rb', line 6 def unmatched_classes @unmatched_classes end |
Instance Method Details
#check ⇒ Object
16 17 18 19 |
# File 'lib/html_scss_class_checker/class_checker.rb', line 16 def check process_directories(@html_directories, 'html') process_directories(@scss_directories, 'scss') end |