class Prism::Comment

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

Attributes

The location of this comment in the source.

Public Class Methods

Create a new comment object with the given location.

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

Public Instance Methods

Implement the hash pattern matching interface for Comment.

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