Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Prism::IfNode#then_keyword_loc

then_keyword_loc

The location of the then keyword (if present) or the ‘?` in a ternary expression, nil otherwise.

if foo then bar end
       ^^^^

a ? b : c
  ^