class Prism::InlineComment
InlineComment objects are the most common. They correspond to comments in the source file like this one that start with #.
InlineComment objects are the most common. They correspond to comments in the source file like this one that start with #.
Public Instance Methods
# File vendor/bundle/ruby/4.0.0/gems/prism-2.1.0-x86_64-linux-gnu/sig/generated/prism/parse_result.rbs, line 530
def inspect: () -> String
Returns a string representation of this comment.
: () -> String
() → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/prism-2.1.0-x86_64-linux-gnu/lib/prism/parse_result.rb, line 753 def trailing? !location.start_line_slice.strip.empty? rescue ArgumentError # invalid bytes, never whitespace only false end
Returns true if this comment happens on the same line as other code and false if the comment is by itself.
Returns true if this comment happens on the same line as other code and false if the comment is by itself.
: () -> bool