Module: Fixtures::Or
Overview
test fixtures for object type
Instance Method Summary collapse
-
#optional ⇒ Example
a numeric example that is optional.
-
#simple ⇒ Example
a simple numeric example, integer or integer array.
- #variants ⇒ Object
Instance Method Details
#optional ⇒ Example
a numeric example that is optional
25 26 27 |
# File 'lib/data_model/fixtures/or.rb', line 25 def optional Example.new([:or, { optional: true }, :integer, [:array, :integer]], variants:) end |
#simple ⇒ Example
a simple numeric example, integer or integer array
19 20 21 |
# File 'lib/data_model/fixtures/or.rb', line 19 def simple Example.new([:or, :integer, [:array, :integer]], variants:) end |
#variants ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/data_model/fixtures/or.rb', line 7 def variants { missing: nil, integer: 1, int_array: [1], string: ["1", 1], float: 1.0 } end |