123456789_123456789_123456789_123456789_123456789_

Class: Prism::Relocation::LeadingCommentsField

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Prism::Relocation::CommentsField
Defined in: lib/prism/relocation.rb

Overview

A field representing the leading comments.

Instance Method Summary

CommentsField - Inherited

#comments

Create comment objects from the given values.

Instance Method Details

#fields(value)

Fetches the leading comments of a value.

[ GitHub ]

  
# File 'lib/prism/relocation.rb', line 337

def fields(value)
  { leading_comments: comments(value.leading_comments) }
end