class SimpleCov::StaticCoverageExtractor::Visitor
def if_like_else_location(node)
inherits the whole condition's range (matches Coverage's
`else_clause`. When neither is present, the synthesized else
to `IF_NODE_SUBSEQUENT_METHOD` at load time); UnlessNode uses
`subsequent` / `consequent` depending on Prism version (resolved
`:else` arm of an if-like construct. IfNode uses
Resolve the source range Coverage attributes to a real-or-synthetic
def if_like_else_location(node) sub = node.is_a?(::Prism::IfNode) ? node.public_send(IF_NODE_SUBSEQUENT_METHOD) : node.else_clause return node.location unless sub arm_location(else_body_of(sub), sub.location) end