Class: Module::DisjunctiveType
- Inherits:
-
CompositeType
- Object
- Module
- CompositeType
- Module::DisjunctiveType
- Defined in:
- lib/composite_type.rb
Constant Summary
Constants inherited from CompositeType
CompositeType::CACHE, CompositeType::CACHE_MUTEX
Instance Attribute Summary
Attributes inherited from CompositeType
Instance Method Summary collapse
Methods inherited from CompositeType
#initialize, #name, new_cached
Methods inherited from Module
Constructor Details
This class inherits a constructor from Module::CompositeType
Instance Method Details
#===(x) ⇒ Object
71 72 73 |
# File 'lib/composite_type.rb', line 71 def === x @_t[0] === x or @_t[1] === x end |
#to_s ⇒ Object
74 75 76 |
# File 'lib/composite_type.rb', line 74 def to_s @to_s ||= "(#{@_t[0]}|#{@_t[1]})".freeze end |