Sha256: 7e6ded53de33f2d82850aa5e996f6951359bb91e6a49b94b91e1a2a8223a559e

Contents?: true

Size: 724 Bytes

Versions: 4

Compression:

Stored size: 724 Bytes

Contents

# typed: strict

module DataModel
	module Fixtures::Integer
		include Fixtures
		extend T::Sig
		extend self

		sig { returns(Example) }
		def simple
			Example.new(
				[:integer],
				variants: {
					valid: 5,
					missing: nil,
					string: ["5", 5]
				},
			)
		end

		sig { returns(Example) }
		def optional
			Example.new(
				[:integer, { optional: true }],
				variants: {
					missing: nil
				},
			)
		end

		sig { returns(Example) }
		def min
			Example.new(
				[:integer, { min: 5 }],
				variants: {
					bigger: 6,
					smaller: 4
				},
			)
		end

		sig { returns(Example) }
		def max
			Example.new(
				[:integer, { max: 5 }],
				variants: {
					bigger: 6,
					smaller: 4
				},
			)
		end
	end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
data_model-0.4.0 lib/data_model/fixtures/integer.rb
data_model-0.3.0 lib/data_model/fixtures/integer.rb
data_model-0.2.0 lib/data_model/fixtures/integer.rb
data_model-0.1.0 lib/data_model/fixtures/integer.rb