Class: RBI::Type::Composite Abstract
- Inherits:
-
Type
- Object
- Type
- RBI::Type::Composite
- Defined in:
- lib/rbi/type.rb
Overview
This class is abstract.
A type that is composed of multiple types like T.all(String, Integer).
Instance Attribute Summary collapse
-
#types ⇒ Object
readonly
: Array.
Instance Method Summary collapse
-
#==(other) ⇒ Object
: (BasicObject other) -> bool.
-
#initialize(types) ⇒ Composite
constructor
: (Array types) -> void.
Constructor Details
Instance Attribute Details
#types ⇒ Object (readonly)
: Array
404 405 406 |
# File 'lib/rbi/type.rb', line 404 def types @types end |
Instance Method Details
#==(other) ⇒ Object
: (BasicObject other) -> bool
414 415 416 |
# File 'lib/rbi/type.rb', line 414 def ==(other) self.class === other && @types.sort_by(&:to_rbi) == other.types.sort_by(&:to_rbi) end |