Sha256: 1e47ef05539ba71170ac1410cdc8695cd253917a357df02ff44fef1f297f3099

Contents?: true

Size: 474 Bytes

Versions: 3

Compression:

Stored size: 474 Bytes

Contents

module DataModel
	# test fixtures for object type
	module Fixtures::Object
		extend self
		include Fixtures

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

		# a simple object example
		# @return [Example] the example
		def simple
			Example.new([:object], variants:)
		end

		# a object example that is optional
		# @return [Example] the example
		def optional
			Example.new([:object, { 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/object.rb
data_model-0.6.0 lib/data_model/fixtures/object.rb
data_model-0.5.0 lib/data_model/fixtures/object.rb