Class: Steep::TypeInference::MethodCall::MethodDecl

Inherits:
Object
  • Object
show all
Defined in:
lib/steep/type_inference/method_call.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method_name:, method_def:) ⇒ MethodDecl

Returns a new instance of MethodDecl.



8
9
10
11
# File 'lib/steep/type_inference/method_call.rb', line 8

def initialize(method_name:, method_def:)
  @method_name = method_name
  @method_def = method_def
end

Instance Attribute Details

#method_defObject (readonly)

Returns the value of attribute method_def.



6
7
8
# File 'lib/steep/type_inference/method_call.rb', line 6

def method_def
  @method_def
end

#method_nameObject (readonly)

Returns the value of attribute method_name.



5
6
7
# File 'lib/steep/type_inference/method_call.rb', line 5

def method_name
  @method_name
end

Instance Method Details

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



17
18
19
# File 'lib/steep/type_inference/method_call.rb', line 17

def ==(other)
  other.is_a?(MethodDecl) && other.method_name == method_name && other.method_def == method_def
end

#hashObject



13
14
15
# File 'lib/steep/type_inference/method_call.rb', line 13

def hash
  method_name.hash
end

#method_typeObject



23
24
25
# File 'lib/steep/type_inference/method_call.rb', line 23

def method_type
  method_def.type
end