Codebase list ohcount / bullseye-backports/main ruby / gestalt / rules / xml_keyword_rule.rb
bullseye-backports/main

Tree @bullseye-backports/main (Download .tar.gz)

xml_keyword_rule.rb @bullseye-backports/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