Skip to Content Skip to Search

This represents a comment that was encountered during parsing. It is the base class for all comment types.

Methods
D
N

Attributes

[R] location

The location of this comment in the source.

Class Public methods

new(location)

Create a new comment object with the given location.

# File ruby/lib/prism/parse_result.rb, line 233
def initialize(location)
  @location = location
end

Instance Public methods

deconstruct_keys(keys)

Implement the hash pattern matching interface for Comment.

# File ruby/lib/prism/parse_result.rb, line 238
def deconstruct_keys(keys)
  { location: location }
end