Class: Wings::FileIds

Inherits:
Valkyrie::ValueMapper
  • Object
show all
Defined in:
lib/wings/converter_value_mapper.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.handles?(value) ⇒ Boolean

Returns:

  • (Boolean)


97
98
99
# File 'lib/wings/converter_value_mapper.rb', line 97

def self.handles?(value)
  value.first == :file_ids
end

Instance Method Details

#resultObject



101
102
103
104
# File 'lib/wings/converter_value_mapper.rb', line 101

def result
  files = value.last.map { |id| Hydra::PCDM::File.new(id.id) }
  [:files, files]
end