Class: Yadriggy::OptionalRole
Overview
Direct Known Subclasses
C::ForeignMethodType, C::NativeMethodType, C::WithReturnType, LocalVarType, ResultType
Instance Method Summary collapse
-
#==(t) ⇒ Object
Checks the equality.
-
#initialize(type) ⇒ OptionalRole
constructor
A new instance of OptionalRole.
-
#supertype ⇒ Type
The super type.
Methods inherited from Type
#!=, #eql?, error_found!, #name, role
Constructor Details
#initialize(type) ⇒ OptionalRole
Returns a new instance of OptionalRole.
648 649 650 |
# File 'lib/yadriggy/type.rb', line 648 def initialize(type) @type = type end |
Instance Method Details
#==(t) ⇒ Object
Checks the equality. The roles (a Yadriggy::OptionalRole objects) in the chain are ignored when objects are compared.
675 676 677 |
# File 'lib/yadriggy/type.rb', line 675 def == (t) @type == t end |
#supertype ⇒ Type
Returns the super type.
714 715 716 |
# File 'lib/yadriggy/type.rb', line 714 def supertype @type.supertype end |