Class: Prism::Relocation::FilepathField

Inherits:
Object
  • Object
show all
Defined in:
lib/prism/relocation.rb

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.



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

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

The file path that this field represents.



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

def value
  @value
end

Instance Method Details

#fields(_value) ⇒ Object

Fetch the file path.



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

def fields(_value)
  { filepath: value }
end