123456789_123456789_123456789_123456789_123456789_

Class: Prism::Relocation::FilepathField

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

Overview

A field that represents the file path.

Class Method Summary

Instance Attribute Summary

  • #value readonly

    The file path that this field represents.

Instance Method Summary

Constructor Details

.new(value) ⇒ FilepathField

Initialize a new field with the given file path.

[ GitHub ]

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

def initialize(value)
  @value = value
end

Instance Attribute Details

#value (readonly)

The file path that this field represents.

[ GitHub ]

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

attr_reader :value

Instance Method Details

#fields(_value)

Fetch the file path.

[ GitHub ]

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

def fields(_value)
  { filepath: value }
end