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.



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

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

The file path that this field represents.



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

def value
  @value
end

Instance Method Details

#fields(_value) ⇒ Object

Fetch the file path.



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

def fields(_value)
  { filepath: value }
end