Class: Steep::TypeInference::LogicTypeInterpreter::Result
- Defined in:
- lib/steep/type_inference/logic_type_interpreter.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
-
#type ⇒ Object
Returns the value of attribute type.
-
#unreachable ⇒ Object
Returns the value of attribute unreachable.
Instance Method Summary collapse
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env
4 5 6 |
# File 'lib/steep/type_inference/logic_type_interpreter.rb', line 4 def env @env end |
#type ⇒ Object
Returns the value of attribute type
4 5 6 |
# File 'lib/steep/type_inference/logic_type_interpreter.rb', line 4 def type @type end |
#unreachable ⇒ Object
Returns the value of attribute unreachable
4 5 6 |
# File 'lib/steep/type_inference/logic_type_interpreter.rb', line 4 def unreachable @unreachable end |
Instance Method Details
#unreachable! ⇒ Object
14 15 16 17 |
# File 'lib/steep/type_inference/logic_type_interpreter.rb', line 14 def unreachable! self.unreachable = true self end |
#update_env ⇒ Object
5 6 7 8 |
# File 'lib/steep/type_inference/logic_type_interpreter.rb', line 5 def update_env env = yield() Result.new(type: type, env: env, unreachable: unreachable) end |
#update_type ⇒ Object
10 11 12 |
# File 'lib/steep/type_inference/logic_type_interpreter.rb', line 10 def update_type Result.new(type: yield, env: env, unreachable: unreachable) end |