123456789_123456789_123456789_123456789_123456789_

Class: Bundler::Settings::Validator

Relationships & Source Files
Namespace Children
Classes:
Inherits: Object
Defined in: lib/bundler/settings/validator.rb

Class Method Summary

Class Method Details

.rule(keys, description, &blk) (private)

[ GitHub ]

  
# File 'lib/bundler/settings/validator.rb', line 46

def self.rule(keys, description, &blk)
  rule = Rule.new(keys, description, &blk)
  keys.each {|k| rules[k] << rule }
end

.rules (private)

[ GitHub ]

  
# File 'lib/bundler/settings/validator.rb', line 41

def self.rules
  @rules ||= Hash.new {|h, k| h[k] = [] }
end

.validate!(key, value, settings)

[ GitHub ]

  
# File 'lib/bundler/settings/validator.rb', line 52

def self.validate!(key, value, settings)
  rules_to_validate = rules[key]
  rules_to_validate.each {|rule| rule.validate!(key, value, settings) }
end