Class: MilkTea::Types::ReflectionHandleType

Inherits:
Base
  • Object
show all
Defined in:
lib/milk_tea/core/types/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#accept, #bitwise?, #boolean?, #children, #field_c_name, #float?, #integer?, #numeric?, #sendable?, #void?

Constructor Details

#initialize(name) ⇒ ReflectionHandleType

Returns a new instance of ReflectionHandleType.



64
65
66
67
68
# File 'lib/milk_tea/core/types/types.rb', line 64

def initialize(name)
  @name = name
  @hash = [self.class, name].hash
  freeze
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



76
77
78
# File 'lib/milk_tea/core/types/types.rb', line 76

def hash
  @hash
end

#nameObject (readonly)

Returns the value of attribute name.



62
63
64
# File 'lib/milk_tea/core/types/types.rb', line 62

def name
  @name
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


70
71
72
# File 'lib/milk_tea/core/types/types.rb', line 70

def eql?(other)
  other.is_a?(ReflectionHandleType) && other.name == name
end

#to_sObject



79
80
81
# File 'lib/milk_tea/core/types/types.rb', line 79

def to_s
  name
end