Class: Rigor::Type::Bot

Inherits:
Object
  • Object
show all
Includes:
AcceptanceRouter
Defined in:
lib/rigor/type/bot.rb,
sig/rigor/type.rbs

Overview

The bottom of the value lattice: contains no values. The result type of expressions that cannot terminate normally. See docs/type-specification/special-types.md.

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.instanceBot (readonly)

Returns the value of attribute instance.

Returns:



16
17
18
# File 'lib/rigor/type/bot.rb', line 16

def instance
  @instance
end

Instance Method Details

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

Parameters:

  • other (Object)

Returns:

  • (Boolean)


43
44
45
# File 'lib/rigor/type/bot.rb', line 43

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

#acceptsAcceptsResult

Parameters:

  • other (Type::t)
  • mode: (accepts_mode)

Returns:



50
# File 'sig/rigor/type.rbs', line 50

def accepts: (Type::t other, ?mode: accepts_mode) -> AcceptsResult

#botTrinary

Returns:



33
34
35
# File 'lib/rigor/type/bot.rb', line 33

def bot
  Trinary.yes
end

#describe(_verbosity = :short) ⇒ String

Parameters:

  • verbosity (Symbol)

Returns:

  • (String)


21
22
23
# File 'lib/rigor/type/bot.rb', line 21

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

#dynamicTrinary

Returns:



37
38
39
# File 'lib/rigor/type/bot.rb', line 37

def dynamic
  Trinary.no
end

#erase_to_rbs"bot"

Returns:



25
26
27
# File 'lib/rigor/type/bot.rb', line 25

def erase_to_rbs
  "bot"
end

#hashInteger

Returns:

  • (Integer)


48
49
50
# File 'lib/rigor/type/bot.rb', line 48

def hash
  Bot.hash
end

#inspect"#<Rigor::Type::Bot>"

Returns:



52
53
54
# File 'lib/rigor/type/bot.rb', line 52

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

#topTrinary

Returns:



29
30
31
# File 'lib/rigor/type/bot.rb', line 29

def top
  Trinary.no
end