Sha256: 82f7c8cbb50b3b33d8c2ff3777450242cd6b3a5bb7abc005c01e5d0555e8cb50
Contents?: true
Size: 916 Bytes
Versions: 3
Compression:
Stored size: 916 Bytes
Contents
module DataModel # Test data for float schemas module Fixtures::Float include Fixtures extend self # a simple float example # @return [Example] the example def simple Example.new( [:float], variants: { valid: 5.0, missing: nil, string: ["5", 5.0] }, ) end # a float example that is optional # @return [Example] the example def optional Example.new( [:float, { optional: true }], variants: { missing: nil }, ) end # a float example where the minimum value is 5 # @return [Example] the example def min Example.new( [:float, { min: 5 }], variants: { bigger: 6.0, smaller: 4.0 }, ) end # a float example where the maximum value is 5 # @return [Example] the example def max Example.new( [:float, { max: 5.0 }], variants: { bigger: 6.0, smaller: 4.0 }, ) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
data_model-0.6.1 | lib/data_model/fixtures/float.rb |
data_model-0.6.0 | lib/data_model/fixtures/float.rb |
data_model-0.5.0 | lib/data_model/fixtures/float.rb |