Class: Steep::TypeInference::Context::BreakContext

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(break_type:, next_type:) ⇒ BreakContext

Returns a new instance of BreakContext.



48
49
50
51
# File 'lib/steep/type_inference/context.rb', line 48

def initialize(break_type:, next_type:)
  @break_type = break_type
  @next_type = next_type
end

Instance Attribute Details

#break_typeObject (readonly)

Returns the value of attribute break_type.



45
46
47
# File 'lib/steep/type_inference/context.rb', line 45

def break_type
  @break_type
end

#next_typeObject (readonly)

Returns the value of attribute next_type.



46
47
48
# File 'lib/steep/type_inference/context.rb', line 46

def next_type
  @next_type
end

Instance Method Details

#subst(s) ⇒ Object



53
54
55
# File 'lib/steep/type_inference/context.rb', line 53

def subst(s)
  BreakContext.new(break_type: break_type.subst(s), next_type: next_type&.subst(s))
end