Class: MilkTea::Types::LifetimeRef
- Defined in:
- lib/milk_tea/core/types/types.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(name) ⇒ LifetimeRef
constructor
A new instance of LifetimeRef.
- #to_s ⇒ Object
Methods inherited from Base
#accept, #bitwise?, #boolean?, #children, #field_c_name, #float?, #integer?, #numeric?, #sendable?, #void?
Constructor Details
#initialize(name) ⇒ LifetimeRef
Returns a new instance of LifetimeRef.
491 492 493 494 |
# File 'lib/milk_tea/core/types/types.rb', line 491 def initialize(name) @name = name freeze end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
489 490 491 |
# File 'lib/milk_tea/core/types/types.rb', line 489 def name @name end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
496 497 498 |
# File 'lib/milk_tea/core/types/types.rb', line 496 def eql?(other) other.is_a?(LifetimeRef) && other.name == name end |
#hash ⇒ Object
502 503 504 |
# File 'lib/milk_tea/core/types/types.rb', line 502 def hash @name.hash end |
#to_s ⇒ Object
507 508 509 |
# File 'lib/milk_tea/core/types/types.rb', line 507 def to_s name end |