Class: Kind::UnionType
- Inherits:
-
Object
- Object
- Kind::UnionType
- Includes:
- BasicObject
- Defined in:
- lib/kind/objects/union_type.rb
Defined Under Namespace
Modules: Buildable
Instance Attribute Summary collapse
-
#inspect ⇒ Object
(also: #name)
readonly
Returns the value of attribute inspect.
Instance Method Summary collapse
- #===(value) ⇒ Object
-
#initialize(kind) ⇒ UnionType
constructor
A new instance of UnionType.
- #|(kind) ⇒ Object
Methods included from BasicObject
#[], #or, #or_nil, #or_null, #or_undefined, #value, #value?
Constructor Details
Instance Attribute Details
#inspect ⇒ Object (readonly) Also known as: name
Returns the value of attribute inspect.
11 12 13 |
# File 'lib/kind/objects/union_type.rb', line 11 def inspect @inspect end |
Instance Method Details
#===(value) ⇒ Object
22 23 24 |
# File 'lib/kind/objects/union_type.rb', line 22 def ===(value) @kinds.any? { |kind| kind === value } end |