The Ruby `call` node whose argument_list (or keyword pair) contains `node` — nearest `call` ancestor within 4 parent hops (function-ref.ts:837).
(node: Node)
| 1193 | /// The Ruby `call` node whose argument_list (or keyword pair) contains `node` |
| 1194 | /// — nearest `call` ancestor within 4 parent hops (function-ref.ts:837). |
| 1195 | fn ruby_enclosing_call(node: Node) -> Option<Node> { |
| 1196 | let mut cur = node.parent(); |
| 1197 | for _ in 0..4 { |
| 1198 | let c = cur?; |
| 1199 | if c.kind() == "call" { |
| 1200 | return Some(c); |
| 1201 | } |
| 1202 | cur = c.parent(); |
| 1203 | } |
| 1204 | None |
| 1205 | } |
| 1206 | |
| 1207 | fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef { |
| 1208 | match s { |
no outgoing calls
no test coverage detected