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:



43
44
45
46
47
# File 'lib/scheming/type.rb', line 43

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

Instance Attribute Details

#typeScheming::Type::Base (readonly)



40
41
42
# File 'lib/scheming/type.rb', line 40

def type
  @type
end