Module: Types::Generic
- Included in:
- Array, Block, Boolean, Class, Class, Decimal, Float, Hash, Integer, Lambda, Method, Nil, Numeric, String, Symbol, Tuple
- Defined in:
- lib/types/generic.rb
Overview
An extension module which allows constructing ‘Any` types using the `|` operator.
Instance Method Summary collapse
-
#composite? ⇒ Boolean
Whether a type contains nested types or not.
- #to_s ⇒ Object
-
#|(other) ⇒ Object
Create an instance of ‘Any` with the arguments as types.
Instance Method Details
#composite? ⇒ Boolean
Whether a type contains nested types or not.
35 36 37 |
# File 'lib/types/generic.rb', line 35 def composite? false end |
#to_s ⇒ Object
39 40 41 |
# File 'lib/types/generic.rb', line 39 def to_s self.name.rpartition('::').last end |