Class: Wings::MemberOfCollectionIds

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)


71
72
73
# File 'lib/wings/converter_value_mapper.rb', line 71

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

Instance Method Details

#resultObject



75
76
77
78
# File 'lib/wings/converter_value_mapper.rb', line 75

def result
  collections = value.last.map { |id| ActiveFedora::Base.find(id.to_s) }
  [:member_of_collections, collections]
end