Sha256: 39b23758460cace7bab06903fc393962d935a75bc94ed51a9c8b65c6b1583c0f

Contents?: true

Size: 399 Bytes

Versions: 14

Compression:

Stored size: 399 Bytes

Contents

module ChefAPI
  module Validator
    autoload :Base,       'chef-api/validators/base'
    autoload :Required,   'chef-api/validators/required'
    autoload :Type,       'chef-api/validators/type'

    #
    # Find a validator by the given key.
    #
    def self.find(key)
      const_get(Util.camelize(key))
    rescue NameError
      raise Error::InvalidValidator.new(key: key)
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
chef-infra-api-0.10.0 lib/chef-api/validator.rb
chef-api-0.10.0 lib/chef-api/validator.rb
chef-infra-api-0.9.1 lib/chef-api/validator.rb
chef-api-0.9.0 lib/chef-api/validator.rb
chef-api-0.8.0 lib/chef-api/validator.rb
chef-api-0.7.1 lib/chef-api/validator.rb
chef-api-0.7.0 lib/chef-api/validator.rb
chef-api-0.6.0 lib/chef-api/validator.rb
chef-api-0.5.0 lib/chef-api/validator.rb
chef-api-0.4.1 lib/chef-api/validator.rb
chef-api-0.4.0 lib/chef-api/validator.rb
chef-api-0.3.0 lib/chef-api/validator.rb
chef-api-0.2.1 lib/chef-api/validator.rb
chef-api-0.2.0 lib/chef-api/validator.rb