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?
lib/ruby/prism/parse_result.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/ruby/prism/parse_result.rb, line 733
def trailing?
raise NotImplementedError, "trailing? is not implemented for #{self.class}"
end
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