Class: Module::DisjunctiveType
- Inherits:
-
CompositeType
- Object
- Module
- CompositeType
- Module::DisjunctiveType
- Defined in:
- lib/typed_attr/composite_type.rb
Instance Method Summary collapse
Methods inherited from CompositeType
Methods inherited from Module
Constructor Details
This class inherits a constructor from Module::CompositeType
Instance Method Details
#===(x) ⇒ Object
44 45 46 |
# File 'lib/typed_attr/composite_type.rb', line 44 def === x @a === x or @b === x end |
#to_s ⇒ Object
47 48 49 |
# File 'lib/typed_attr/composite_type.rb', line 47 def to_s @to_s ||= "(#{@a}|#{@b})".freeze end |