Merge pull request #41 from blackducksw/ubuntu_14
[ohcount] / ruby / gestalt / rules / xml_keyword_rule.rb
1 module Ohcount
2         module Gestalt
3                 class XmlKeywordRule < KeywordRule
4
5                         def initialize(*keywords)
6                                 super('xml',*keywords)
7                         end
8
9                         def trigger_file?(source_file)
10                                 return false unless source_file.polyglot = 'xml'
11                                 regexp.match(source_file.language_breakdowns('xml').code)
12                         end
13                 end
14         end
15 end