Class: Yoda::Typing::Tree::Rescue
- Defined in:
- lib/yoda/typing/tree/rescue.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#build_child, #generator, #infer_child, #initialize, #inspect, #pretty_print, #type
Constructor Details
This class inherits a constructor from Yoda::Typing::Tree::Base
Instance Method Details
#infer_type ⇒ Types::Base
9 10 11 12 13 14 |
# File 'lib/yoda/typing/tree/rescue.rb', line 9 def infer_type type = infer_child(node.body) node.rescue_clauses.each { |rescue_clause| infer_child(rescue_clause) } infer_child(node.else_clause) type end |