Class: Prism::Relocation::CommentsField::Comment

Inherits:
Object
  • Object
show all
Defined in:
lib/prism/relocation.rb

Overview

An object that represents a slice of a comment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(slice) ⇒ Comment

Initialize a new comment with the given slice.



322
323
324
# File 'lib/prism/relocation.rb', line 322

def initialize(slice)
  @slice = slice
end

Instance Attribute Details

#sliceObject (readonly)

The slice of the comment.



319
320
321
# File 'lib/prism/relocation.rb', line 319

def slice
  @slice
end