Sha256: 47921a291600a7e4c875421ff6ff346179df5285a3dcb0f2d55cbb48a894a6a4
Contents?: true
Size: 627 Bytes
Versions: 20
Compression:
Stored size: 627 Bytes
Contents
require_relative '../rule_engine' class ConfigurationVisitor def self.Visit configurationsHash = {} rules = RuleEngine.rules rules.each do |rule| configurationsHash[rule] = [] rule.configurations.each do |configuration| configurationsHash[rule].append(configuration) end end return configurationsHash end def self.GenerateIDs configurationsHash = self.Visit configurationsHash.each do |rule,configurations| configurations.each do |configuration| configuration.id = "#{rule}-#{configuration.name.downcase.gsub! ' ', '_'}" end end end end
Version data entries
20 entries across 20 versions & 1 rubygems