Class: Steep::TypeInference::Context::BlockContext
- Defined in:
- lib/steep/type_inference/context.rb
Instance Attribute Summary collapse
-
#body_type ⇒ Object
readonly
Returns the value of attribute body_type.
Instance Method Summary collapse
-
#initialize(body_type:) ⇒ BlockContext
constructor
A new instance of BlockContext.
- #subst(s) ⇒ Object
Constructor Details
#initialize(body_type:) ⇒ BlockContext
Returns a new instance of BlockContext.
35 36 37 |
# File 'lib/steep/type_inference/context.rb', line 35 def initialize(body_type:) @body_type = body_type end |
Instance Attribute Details
#body_type ⇒ Object (readonly)
Returns the value of attribute body_type.
33 34 35 |
# File 'lib/steep/type_inference/context.rb', line 33 def body_type @body_type end |
Instance Method Details
#subst(s) ⇒ Object
39 40 41 |
# File 'lib/steep/type_inference/context.rb', line 39 def subst(s) BlockContext.new(body_type: body_type&.subst(s)) end |