class Bundler::Settings::Validator
def self.rule(keys, description, &blk)
def self.rule(keys, description, &blk) rule = Rule.new(keys, description, &blk) keys.each {|k| rules[k] << rule } end
def self.rules
def self.rules @rules ||= Hash.new {|h, k| h[k] = [] } end
def self.validate!(key, value, settings)
def self.validate!(key, value, settings) rules_to_validate = rules[key] rules_to_validate.each {|rule| rule.validate!(key, value, settings) } end