Class: Module::NegativeType
Constant Summary
collapse
- INVERSE_MAP =
{
}
CompositeType::CACHE, CompositeType::CACHE_MUTEX
Constants inherited
from Module
Void
Instance Attribute Summary
#_t
Class Method Summary
collapse
Instance Method Summary
collapse
#initialize, #name, new_cached
Methods inherited from Module
#&, #of, #with, #|, #~@
Class Method Details
.inverse(a, b) ⇒ Object
175
176
177
178
|
# File 'lib/composite_type.rb', line 175
def self.inverse(a, b)
INVERSE_MAP[a] = b
INVERSE_MAP[b] = a
end
|
Instance Method Details
#===(x) ⇒ Object
160
161
162
|
# File 'lib/composite_type.rb', line 160
def === x
! (@_t[0] === x)
end
|
#>=(t) ⇒ Object
164
165
166
167
|
# File 'lib/composite_type.rb', line 164
def >= t
t.is_a?(self.class) and
t._t[0] >= @_t[0]
end
|
#to_s ⇒ Object
169
170
171
|
# File 'lib/composite_type.rb', line 169
def to_s
@to_s ||= "(~#{@_t[0]})".freeze
end
|