Module: Yoda::AST::MethodTraversable
- Included in:
- Vnode
- Defined in:
- lib/yoda/ast/method_traversable.rb
Instance Method Summary collapse
- #calc_current_location_method(location) ⇒ DefNode, ...
- #including_method ⇒ Namespace
- #method? ⇒ true, false
Instance Method Details
#calc_current_location_method(location) ⇒ DefNode, ...
17 18 19 |
# File 'lib/yoda/ast/method_traversable.rb', line 17 def calc_current_location_method(location) positionally_nearest_child(location)&.including_method end |
#including_method ⇒ Namespace
11 12 13 |
# File 'lib/yoda/ast/method_traversable.rb', line 11 def including_method @including_method ||= method? ? self : parent.including_method end |
#method? ⇒ true, false
6 7 8 |
# File 'lib/yoda/ast/method_traversable.rb', line 6 def method? false end |