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.
635 636 637 |
# File 'lib/yadriggy/type.rb', line 635 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.
662 663 664 |
# File 'lib/yadriggy/type.rb', line 662 def == (t) @type == t end |
#supertype ⇒ Type
Returns the super type.
701 702 703 |
# File 'lib/yadriggy/type.rb', line 701 def supertype @type.supertype end |