Class: Module::PairType
- Inherits:
-
CompositeType
- Object
- Module
- CompositeType
- Module::PairType
- 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
28 29 30 |
# File 'lib/typed_attr/composite_type.rb', line 28 def === x Enumerable === x and @a === x[0] and @b === x[1] end |
#to_s ⇒ Object
31 32 33 |
# File 'lib/typed_attr/composite_type.rb', line 31 def to_s @to_s ||= "#{@a}.with(#{@b})".freeze end |