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.
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_type ⇒ Object (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_type ⇒ Object (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 |