Class: Steep::TypeInference::Context::MethodContext
- Defined in:
- lib/steep/type_inference/context.rb
Instance Attribute Summary collapse
-
#block_param_name ⇒ Object
readonly
Returns the value of attribute block_param_name.
-
#forward_arg_type ⇒ Object
readonly
Returns the value of attribute forward_arg_type.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#method_type ⇒ Object
readonly
Returns the value of attribute method_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#return_type ⇒ Object
readonly
Returns the value of attribute return_type.
-
#super_method ⇒ Object
readonly
Returns the value of attribute super_method.
Instance Method Summary collapse
- #attribute_setter? ⇒ Boolean
- #block_type ⇒ Object
-
#initialize(name:, method:, method_type:, return_type:, super_method:, forward_arg_type:, block_param_name: nil) ⇒ MethodContext
constructor
A new instance of MethodContext.
Constructor Details
#initialize(name:, method:, method_type:, return_type:, super_method:, forward_arg_type:, block_param_name: nil) ⇒ MethodContext
Returns a new instance of MethodContext.
13 14 15 16 17 18 19 20 21 |
# File 'lib/steep/type_inference/context.rb', line 13 def initialize(name:, method:, method_type:, return_type:, super_method:, forward_arg_type:, block_param_name: nil) @name = name @method = method @return_type = return_type @method_type = method_type @super_method = super_method @forward_arg_type = forward_arg_type @block_param_name = block_param_name end |
Instance Attribute Details
#block_param_name ⇒ Object (readonly)
Returns the value of attribute block_param_name.
11 12 13 |
# File 'lib/steep/type_inference/context.rb', line 11 def block_param_name @block_param_name end |
#forward_arg_type ⇒ Object (readonly)
Returns the value of attribute forward_arg_type.
10 11 12 |
# File 'lib/steep/type_inference/context.rb', line 10 def forward_arg_type @forward_arg_type end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
6 7 8 |
# File 'lib/steep/type_inference/context.rb', line 6 def method @method end |
#method_type ⇒ Object (readonly)
Returns the value of attribute method_type.
7 8 9 |
# File 'lib/steep/type_inference/context.rb', line 7 def method_type @method_type end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/steep/type_inference/context.rb', line 5 def name @name end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type.
8 9 10 |
# File 'lib/steep/type_inference/context.rb', line 8 def return_type @return_type end |
#super_method ⇒ Object (readonly)
Returns the value of attribute super_method.
9 10 11 |
# File 'lib/steep/type_inference/context.rb', line 9 def super_method @super_method end |
Instance Method Details
#attribute_setter? ⇒ Boolean
27 28 29 |
# File 'lib/steep/type_inference/context.rb', line 27 def attribute_setter? name.to_s.end_with?('=') end |
#block_type ⇒ Object
23 24 25 |
# File 'lib/steep/type_inference/context.rb', line 23 def block_type method_type&.block end |