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.



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

def initialize(slice)
  @slice = slice
end

Instance Attribute Details

#sliceObject (readonly)

The slice of the comment.



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

def slice
  @slice
end