Codebase list ohcount / run/8fccc97f-1091-4606-8a80-1b8fb386766a/main ruby / gestalt / rules / xml_keyword_rule.rb
run/8fccc97f-1091-4606-8a80-1b8fb386766a/main

Tree @run/8fccc97f-1091-4606-8a80-1b8fb386766a/main (Download .tar.gz)

xml_keyword_rule.rb @run/8fccc97f-1091-4606-8a80-1b8fb386766a/mainraw · history · blame

module Ohcount
	module Gestalt
		class XmlKeywordRule < KeywordRule

			def initialize(*keywords)
				super('xml',*keywords)
			end

			def trigger_file?(source_file)
				return false unless source_file.polyglot = 'xml'
				regexp.match(source_file.language_breakdowns('xml').code)
			end
		end
	end
end