Class: Scheming::Type::Nullable

Inherits:
Base
  • Object
show all
Defined in:
lib/scheming/type.rb

Overview

Nullable Type Definition

Type wrapper that describes a type can be either the type provided OR it may be Null

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Nullable

Returns a new instance of Nullable.

Parameters:



73
74
75
76
77
# File 'lib/scheming/type.rb', line 73

def initialize(type)
  super()
  @type = type
  freeze
end

Instance Attribute Details

#typeScheming::Type::Base (readonly)

Returns:



70
71
72
# File 'lib/scheming/type.rb', line 70

def type
  @type
end