Method: DressCode::Extractor#parse_file

Defined in:
lib/dress_code/extractor.rb

#parse_file(path) ⇒ Object



23
24
25
26
27
28
# File 'lib/dress_code/extractor.rb', line 23

def parse_file(path)
  src = File.read(path, encoding: 'bom|utf-8')
  matches = scan(src)
  return unless matches.length
  matches.map { |match| create_doc(match, path) }
end