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)
| 1185 | /// The Ruby `call` node whose argument_list (or keyword pair) contains `node` |
| 1186 | /// — nearest `call` ancestor within 4 parent hops (function-ref.ts:837). |
| 1187 | fn ruby_enclosing_call(node: Node) -> Option<Node> { |
| 1188 | let mut cur = node.parent(); |
| 1189 | for _ in 0..4 { |
| 1190 | let c = cur?; |
| 1191 | if c.kind() == "call" { |
| 1192 | return Some(c); |
| 1193 | } |
| 1194 | cur = c.parent(); |
| 1195 | } |
| 1196 | None |
| 1197 | } |
| 1198 | |
| 1199 | fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef { |
| 1200 | match s { |
no outgoing calls
no test coverage detected