Class: Rigor::Type::Top

Inherits:
Object
  • Object
show all
Includes:
AcceptanceRouter
Defined in:
lib/rigor/type/top.rb

Overview

The top of the value lattice: contains every value, including untyped boundaries. See docs/type-specification/special-types.md.

Class Attribute Summary collapse

Instance Method Summary collapse

Methods included from AcceptanceRouter

#accepts

Class Attribute Details

.instanceObject (readonly)

Returns the value of attribute instance.



15
16
17
# File 'lib/rigor/type/top.rb', line 15

def instance
  @instance
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



42
43
44
# File 'lib/rigor/type/top.rb', line 42

def ==(other)
  other.is_a?(Top)
end

#botObject



32
33
34
# File 'lib/rigor/type/top.rb', line 32

def bot
  Trinary.no
end

#describe(_verbosity = :short) ⇒ Object



20
21
22
# File 'lib/rigor/type/top.rb', line 20

def describe(_verbosity = :short)
  "top"
end

#dynamicObject



36
37
38
# File 'lib/rigor/type/top.rb', line 36

def dynamic
  Trinary.no
end

#erase_to_rbsObject



24
25
26
# File 'lib/rigor/type/top.rb', line 24

def erase_to_rbs
  "top"
end

#hashObject



47
48
49
# File 'lib/rigor/type/top.rb', line 47

def hash
  Top.hash
end

#inspectObject



51
52
53
# File 'lib/rigor/type/top.rb', line 51

def inspect
  "#<Rigor::Type::Top>"
end

#topObject



28
29
30
# File 'lib/rigor/type/top.rb', line 28

def top
  Trinary.yes
end