Class: Prism::Relocation::FilepathField

Inherits:
Object
  • Object
show all
Defined in:
lib/prism/relocation.rb,
sig/generated/prism/relocation.rbs

Overview

A field that represents the file path.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ FilepathField

Initialize a new field with the given file path.

: (String value) -> void

Parameters:

  • value (String)


256
257
258
# File 'lib/prism/relocation.rb', line 256

def initialize(value)
  @value = value
end

Instance Attribute Details

#value ⇒ String (readonly)

The file path that this field represents.

Returns:

  • (String)


251
252
253
# File 'lib/prism/relocation.rb', line 251

def value
  @value
end

Instance Method Details

#fields(_value) ⇒ entry_values

Fetch the file path.

: (_Value _value) -> entry_values

Parameters:

Returns:

  • (entry_values)


263
264
265
# File 'lib/prism/relocation.rb', line 263

def fields(_value)
  { filepath: value }
end