Class: NRSER::Types::Top
Overview
The top type is the universal type - all values are members.
Constant Summary collapse
- NAME =
'*'
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
AnyType instances are all equal.
- #explain ⇒ Object
- #from_s(string) ⇒ Object
- #has_from_s? ⇒ Boolean
-
#initialize ⇒ Top
constructor
A new instance of Top.
- #symbolic ⇒ Object
- #test?(value) ⇒ Boolean
Methods inherited from Type
#===, #builtin_inspect, #check, #check!, #default_name, #default_symbolic, #from_data, #has_from_data?, #has_to_data?, #inspect, #intersection, #name, #not, #respond_to?, #test, #to_data, #to_proc, #to_s, #union, #xor
Constructor Details
Instance Method Details
#==(other) ⇒ Boolean
Note:
‘other`’s class must be AnyType exactly - we make no assumptions about anything that has subclasses AnyType.
AnyType instances are all equal.
68 69 70 |
# File 'lib/nrser/types/top.rb', line 68 def == other other.class == Top end |
#explain ⇒ Object
39 40 41 |
# File 'lib/nrser/types/top.rb', line 39 def explain 'Top' end |
#from_s(string) ⇒ Object
51 52 53 |
# File 'lib/nrser/types/top.rb', line 51 def from_s string string end |
#symbolic ⇒ Object
43 44 45 |
# File 'lib/nrser/types/top.rb', line 43 def symbolic '*' # '⊤' end |