Class: MilkTea::Types::CallableHandle
- Defined in:
- lib/milk_tea/core/types/types.rb
Instance Attribute Summary collapse
-
#declaration ⇒ Object
readonly
Returns the value of attribute declaration.
-
#display_name ⇒ Object
readonly
Returns the value of attribute display_name.
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(display_name, declaration) ⇒ CallableHandle
constructor
A new instance of CallableHandle.
- #to_s ⇒ Object
Methods inherited from Base
#accept, #bitwise?, #boolean?, #children, #field_c_name, #float?, #integer?, #numeric?, #sendable?, #void?
Constructor Details
#initialize(display_name, declaration) ⇒ CallableHandle
Returns a new instance of CallableHandle.
303 304 305 306 307 308 |
# File 'lib/milk_tea/core/types/types.rb', line 303 def initialize(display_name, declaration) @display_name = display_name @declaration = declaration @hash = [self.class, display_name].hash freeze end |
Instance Attribute Details
#declaration ⇒ Object (readonly)
Returns the value of attribute declaration.
301 302 303 |
# File 'lib/milk_tea/core/types/types.rb', line 301 def declaration @declaration end |
#display_name ⇒ Object (readonly)
Returns the value of attribute display_name.
301 302 303 |
# File 'lib/milk_tea/core/types/types.rb', line 301 def display_name @display_name end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
316 317 318 |
# File 'lib/milk_tea/core/types/types.rb', line 316 def hash @hash end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
310 311 312 |
# File 'lib/milk_tea/core/types/types.rb', line 310 def eql?(other) other.is_a?(CallableHandle) && other.display_name == display_name end |
#to_s ⇒ Object
319 320 321 |
# File 'lib/milk_tea/core/types/types.rb', line 319 def to_s "callable_of(#{display_name})" end |