Sha256: 1597c3c5ac4b542de3e92e916a431f08332d3980aded10b153e134da83fe60a1

Contents?: true

Size: 269 Bytes

Versions: 2

Compression:

Stored size: 269 Bytes

Contents

# frozen_string_literal: true

require_relative 'setup'

Schema = Dry::Types['params.hash'].schema(
  email?: 'string',
  age?: 'coercible.integer'
).lax

ValidInput = { email: 'jane@doe.org', age: '19' }

profile do
  10_000.times do
    Schema.(ValidInput)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dry-types-1.0.1 benchmarks/profile_lax_schema_valid.rb
dry-types-1.0.0 benchmarks/profile_lax_schema_valid.rb