Class: Steep::TypeInference::Context::BreakContext
- Defined in:
- lib/steep/type_inference/context.rb
Instance Attribute Summary collapse
-
#break_type ⇒ Object
readonly
Returns the value of attribute break_type.
-
#next_type ⇒ Object
readonly
Returns the value of attribute next_type.
Instance Method Summary collapse
-
#initialize(break_type:, next_type:) ⇒ BreakContext
constructor
A new instance of BreakContext.
- #subst(s) ⇒ Object
Constructor Details
#initialize(break_type:, next_type:) ⇒ BreakContext
Returns a new instance of BreakContext.
46 47 48 49 |
# File 'lib/steep/type_inference/context.rb', line 46 def initialize(break_type:, next_type:) @break_type = break_type @next_type = next_type end |
Instance Attribute Details
#break_type ⇒ Object (readonly)
Returns the value of attribute break_type.
43 44 45 |
# File 'lib/steep/type_inference/context.rb', line 43 def break_type @break_type end |
#next_type ⇒ Object (readonly)
Returns the value of attribute next_type.
44 45 46 |
# File 'lib/steep/type_inference/context.rb', line 44 def next_type @next_type end |
Instance Method Details
#subst(s) ⇒ Object
51 52 53 |
# File 'lib/steep/type_inference/context.rb', line 51 def subst(s) BreakContext.new(break_type: break_type.subst(s), next_type: next_type&.subst(s)) end |