Module: Fixtures::Object

Extended by:
Object
Includes:
Fixtures
Included in:
Object
Defined in:
lib/data_model/fixtures/object.rb

Overview

test fixtures for object type

Instance Method Summary collapse

Instance Method Details

#optionalExample

a object example that is optional

Returns:



23
24
25
# File 'lib/data_model/fixtures/object.rb', line 23

def optional
	Example.new([:object, { optional: true }], variants:)
end

#simpleExample

a simple object example

Returns:



17
18
19
# File 'lib/data_model/fixtures/object.rb', line 17

def simple
	Example.new([:object], variants:)
end

#variantsObject



7
8
9
10
11
12
13
# File 'lib/data_model/fixtures/object.rb', line 7

def variants
	{
		missing: nil,
		integer: 1,
		string: "string"
	}
end