123456789_123456789_123456789_123456789_123456789_

Class: Prism::Relocation::CharacterOffsetsField

Relationships & Source Files
Inherits: Object
Defined in: lib/prism/relocation.rb

Overview

A field representing the start and end character offsets.

Instance Method Summary

Instance Method Details

#fields(value)

Fetches the start and end character offset of a value.

[ GitHub ]

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

def fields(value)
  {
    start_character_offset: value.start_character_offset,
    end_character_offset: value.end_character_offset
  }
end