class Prism::InlineComment
InlineComment objects are the most common. They correspond to comments in the source file like this one that start with #.
Public Instance Methods
Source
# File lib/prism/parse_result.rb, line 537
def inspect
"#<Prism::InlineComment @location=#{location.inspect}>"
end Returns a string representation of this comment.
Source
# File lib/prism/parse_result.rb, line 532 def trailing? !location.start_line_slice.strip.empty? end
Returns true if this comment happens on the same line as other code and false if the comment is by itself.
Ruby Core © 1993–2024 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.