Class: HtmlScssClassChecker::ClassChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/html_scss_class_checker/class_checker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_mappingObject (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_classesObject (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

#checkObject



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