Class: Typisch::Type::Nothing

Inherits:
Union show all
Defined in:
lib/typisch/union.rb

Overview

The Nothing (or ‘bottom’) type is just an empty Union:

Constant Summary collapse

INSTANCE =
new

Instance Attribute Summary

Attributes inherited from Union

#alternative_types

Attributes inherited from Typisch::Type

#name

Instance Method Summary collapse

Methods inherited from Union

#canonicalize!, #check_type, #excluding_null, #shallow_check_type, #to_string

Methods inherited from Typisch::Type

#<, #<=, #<=>, #==, #===, #>, #>=, #alternative_types, #annotations, #annotations=, #canonicalize!, #excluding_null, #inspect, #recursive?, #shallow_check_type, #subexpression_types, subtype?, #target, #to_string

Constructor Details

#initializeNothing

Returns a new instance of Nothing.



43
44
45
# File 'lib/typisch/union.rb', line 43

def initialize
  super
end

Instance Method Details

#to_sObject



47
# File 'lib/typisch/union.rb', line 47

def to_s(*); @name.inspect; end