5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/framework_guesser/matcher.rb', line 5
def match(, body)
@headers =
@data = body
@result = { :features => [] }
@document = Nokogiri::HTML(@data)
description = @document.css("meta[name=description], meta[name=Description]").first
@result[:description] = description['content'] if description
keywords = @document.css("meta[name=keywords], meta[name=keywords]").first
@result[:keywords] = keywords['content'] if keywords
run
@result[:features].uniq!
@result
end
|