123456789_123456789_123456789_123456789_123456789_

Class: Prism::EmbDocComment

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Comment
Instance Chain:
self, Comment
Inherits: Prism::Comment
Defined in: lib/prism/parse_result.rb,
prism/extension.c

Overview

EmbDocComment objects correspond to comments that are surrounded by =begin and =end.

Class Method Summary

Comment - Inherited

.new

Create a new comment object with the given location.

Instance Attribute Summary

Comment - Inherited

#location

The location of this comment in the source.

Instance Method Summary

  • #inspect

    Returns a string representation of this comment.

Comment - Inherited

#deconstruct_keys

Implement the hash pattern matching interface for Comment.

Constructor Details

This class inherits a constructor from Prism::Comment

Instance Attribute Details

#trailing?Boolean (readonly)

This can only be true for inline comments.

[ GitHub ]

  
# File 'lib/prism/parse_result.rb', line 262

def trailing?
  false
end

Instance Method Details

#inspect

Returns a string representation of this comment.

[ GitHub ]

  
# File 'lib/prism/parse_result.rb', line 267

def inspect
  "#<Prism::EmbDocComment @location=#{location.inspect}>"
end