Sha256: 56135fe5219908e5713bd5aed14ec75b29a66122686201ff8bc47408c4ad58dc
Contents?: true
Size: 545 Bytes
Versions: 3
Compression:
Stored size: 545 Bytes
Contents
require "bigdecimal/util" module DataModel # test fixtures for object type module Fixtures::Numeric extend self include Fixtures def variants { missing: nil, integer: 1, float: 1.0, decimal: 1.0.to_d, string: ["1", 1] } end # a simple numeric example # @return [Example] the example def simple Example.new([:numeric], variants:) end # a numeric example that is optional # @return [Example] the example def optional Example.new([:numeric, { optional: true }], variants:) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
data_model-0.6.1 | lib/data_model/fixtures/numeric.rb |
data_model-0.6.0 | lib/data_model/fixtures/numeric.rb |
data_model-0.5.0 | lib/data_model/fixtures/numeric.rb |