Class: Rigor::Type::Top
- Inherits:
-
Object
- Object
- Rigor::Type::Top
- 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 ⇒ Object
readonly
Returns the value of attribute instance.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #accepts(other, mode: :gradual) ⇒ Object
- #bot ⇒ Object
- #describe(_verbosity = :short) ⇒ Object
- #dynamic ⇒ Object
- #erase_to_rbs ⇒ Object
- #hash ⇒ Object
- #inspect ⇒ Object
- #top ⇒ Object
Class Attribute Details
.instance ⇒ Object (readonly)
Returns the value of attribute instance.
14 15 16 |
# File 'lib/rigor/type/top.rb', line 14 def instance @instance end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
43 44 45 |
# File 'lib/rigor/type/top.rb', line 43 def ==(other) other.is_a?(Top) end |
#accepts(other, mode: :gradual) ⇒ Object
39 40 41 |
# File 'lib/rigor/type/top.rb', line 39 def accepts(other, mode: :gradual) Inference::Acceptance.accepts(self, other, mode: mode) end |
#describe(_verbosity = :short) ⇒ Object
19 20 21 |
# File 'lib/rigor/type/top.rb', line 19 def describe(_verbosity = :short) "top" end |
#erase_to_rbs ⇒ Object
23 24 25 |
# File 'lib/rigor/type/top.rb', line 23 def erase_to_rbs "top" end |
#hash ⇒ Object
48 49 50 |
# File 'lib/rigor/type/top.rb', line 48 def hash Top.hash end |
#inspect ⇒ Object
52 53 54 |
# File 'lib/rigor/type/top.rb', line 52 def inspect "#<Rigor::Type::Top>" end |