Sha256: cf9dff07a09bd728e11c8cb050f363cc52349fec6be400fd76a8dce8b09145c4
Contents?: true
Size: 309 Bytes
Versions: 4
Compression:
Stored size: 309 Bytes
Contents
require 'technologist/rules/rule' require 'nokogiri' class FileXmlContentRule < Rule attr_accessor :file_name, :css_selector def matches?(repository) !!repository.file_with_content_exists?(file_name) do |content| xml = Nokogiri::XML(content) xml.css(css_selector).any? end end end
Version data entries
4 entries across 4 versions & 1 rubygems