Class: MilkTea::Types::MemberHandle
- Defined in:
- lib/milk_tea/core/types/types.rb
Instance Attribute Summary collapse
-
#enum_handle ⇒ Object
readonly
Returns the value of attribute enum_handle.
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#member_name ⇒ Object
readonly
Returns the value of attribute member_name.
-
#member_value ⇒ Object
readonly
Returns the value of attribute member_value.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(enum_handle, member_name, member_value) ⇒ MemberHandle
constructor
A new instance of MemberHandle.
- #name ⇒ Object
- #to_s ⇒ Object
- #value ⇒ Object
Methods inherited from Base
#accept, #bitwise?, #boolean?, #children, #field_c_name, #float?, #integer?, #numeric?, #sendable?, #void?
Constructor Details
#initialize(enum_handle, member_name, member_value) ⇒ MemberHandle
Returns a new instance of MemberHandle.
358 359 360 361 362 363 364 |
# File 'lib/milk_tea/core/types/types.rb', line 358 def initialize(enum_handle, member_name, member_value) @enum_handle = enum_handle @member_name = member_name @member_value = member_value @hash = [self.class, enum_handle, member_name].hash freeze end |
Instance Attribute Details
#enum_handle ⇒ Object (readonly)
Returns the value of attribute enum_handle.
356 357 358 |
# File 'lib/milk_tea/core/types/types.rb', line 356 def enum_handle @enum_handle end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
380 381 382 |
# File 'lib/milk_tea/core/types/types.rb', line 380 def hash @hash end |
#member_name ⇒ Object (readonly)
Returns the value of attribute member_name.
356 357 358 |
# File 'lib/milk_tea/core/types/types.rb', line 356 def member_name @member_name end |
#member_value ⇒ Object (readonly)
Returns the value of attribute member_value.
356 357 358 |
# File 'lib/milk_tea/core/types/types.rb', line 356 def member_value @member_value end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
374 375 376 |
# File 'lib/milk_tea/core/types/types.rb', line 374 def eql?(other) other.is_a?(MemberHandle) && other.member_name == member_name && other.enum_handle == enum_handle end |
#name ⇒ Object
366 367 368 |
# File 'lib/milk_tea/core/types/types.rb', line 366 def name member_name end |
#to_s ⇒ Object
383 384 385 |
# File 'lib/milk_tea/core/types/types.rb', line 383 def to_s "member_of(#{enum_handle}, #{member_name})" end |
#value ⇒ Object
370 371 372 |
# File 'lib/milk_tea/core/types/types.rb', line 370 def value member_value end |