Class: Wings::NestedEmbargoValue

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)


155
156
157
# File 'lib/wings/converter_value_mapper.rb', line 155

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

Instance Method Details

#resultObject



159
160
161
162
163
# File 'lib/wings/converter_value_mapper.rb', line 159

def result
  embargo = ActiveFedoraConverter.new(resource: Hyrax::Embargo.new(**value.last)).convert

  [:embargo, embargo]
end