Class: Rigor::Type::Top
- Inherits:
-
Object
- Object
- Rigor::Type::Top
- Includes:
- AcceptanceRouter
- Defined in:
- lib/rigor/type/top.rb,
sig/rigor/type.rbs
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 ⇒ Top
readonly
Returns the value of attribute instance.
Instance Method Summary collapse
- #==(other) ⇒ Boolean (also: #eql?)
- #accepts ⇒ AcceptsResult
- #bot ⇒ Trinary
- #describe(_verbosity = :short) ⇒ String
- #dynamic ⇒ Trinary
- #erase_to_rbs ⇒ "top"
- #hash ⇒ Integer
- #inspect ⇒ "#<Rigor::Type::Top>"
- #top ⇒ Trinary
Class Attribute Details
.instance ⇒ Top (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) ⇒ Boolean Also known as: eql?
42 43 44 |
# File 'lib/rigor/type/top.rb', line 42 def ==(other) other.is_a?(Top) end |
#accepts ⇒ AcceptsResult
37 |
# File 'sig/rigor/type.rbs', line 37
def accepts: (Type::t other, ?mode: accepts_mode) -> AcceptsResult
|
#describe(_verbosity = :short) ⇒ String
20 21 22 |
# File 'lib/rigor/type/top.rb', line 20 def describe(_verbosity = :short) "top" end |
#inspect ⇒ "#<Rigor::Type::Top>"
51 52 53 |
# File 'lib/rigor/type/top.rb', line 51 def inspect "#<Rigor::Type::Top>" end |