Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Ruby::Prism::Comment#trailing?

trailing?

Returns true if this comment happens on the same line as other code and false if the comment is by itself. This can only be true for inline comments and should be false for block comments.

: () -> bool

See also #slice .new