Class: Steep::TypeInference::Context::BlockContext

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body_type:) ⇒ BlockContext

Returns a new instance of BlockContext.



33
34
35
# File 'lib/steep/type_inference/context.rb', line 33

def initialize(body_type:)
  @body_type = body_type
end

Instance Attribute Details

#body_typeObject (readonly)

Returns the value of attribute body_type.



31
32
33
# File 'lib/steep/type_inference/context.rb', line 31

def body_type
  @body_type
end

Instance Method Details

#subst(s) ⇒ Object



37
38
39
# File 'lib/steep/type_inference/context.rb', line 37

def subst(s)
  BlockContext.new(body_type: body_type&.subst(s))
end