Sha256: fb7b0e14d9e8d10a8e5beb0f4728a4d1ce0eec28e711aab4a21900fe4c7d86b9

Contents?: true

Size: 505 Bytes

Versions: 10

Compression:

Stored size: 505 Bytes

Contents

module Grape
  module Validations
    class ValidatorFactory
      def initialize(**options)
        @validator_class = options.delete(:validator_class)
        @options         = options
      end

      def create_validator
        @validator_class.new(@options[:attributes],
                             @options[:options],
                             @options[:required],
                             @options[:params_scope],
                             @options[:opts])
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
grape-1.2.4 lib/grape/validations/validator_factory.rb
grape-1.2.3 lib/grape/validations/validator_factory.rb
grape-1.2.2 lib/grape/validations/validator_factory.rb
grape-1.2.1 lib/grape/validations/validator_factory.rb
grape-1.2.0 lib/grape/validations/validator_factory.rb
grape-1.1.0 lib/grape/validations/validator_factory.rb
grape-1.0.3 lib/grape/validations/validator_factory.rb
grape-1.0.2 lib/grape/validations/validator_factory.rb
grape-1.0.1 lib/grape/validations/validator_factory.rb
grape-1.0.0 lib/grape/validations/validator_factory.rb