Sha256: 19ff959c6e245f890b26796c4155013704280c46b5fc144e78bfe0f6d440b700

Contents?: true

Size: 402 Bytes

Versions: 7

Compression:

Stored size: 402 Bytes

Contents

require 'standalone_validator'
require 'standalone_validator/definitions'

class StandaloneValidator
  module NamedValidations
    def self.create(name, klass)
      Definitions.register_validation_factory(name, klass)
    end
  end
end

require 'pathname'
validations = Pathname(__FILE__).parent + "named_validations" + "*.rb"

Dir[validations].each do |validation_file|
  require validation_file
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
standalone_validator-0.2.3 lib/standalone_validator/named_validations.rb
standalone_validator-0.2.2 lib/standalone_validator/named_validations.rb
standalone_validator-0.2.1 lib/standalone_validator/named_validations.rb
standalone_validator-0.2.0 lib/standalone_validator/named_validations.rb
standalone_validator-0.1.0 lib/standalone_validator/named_validations.rb
standalone_validator-0.0.2 lib/standalone_validator/named_validations.rb
standalone_validator-0.0.1 lib/standalone_validator/named_validations.rb