Class: Wings::NestedLeaseValue

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)

185
186
187
# File 'lib/wings/converter_value_mapper.rb', line 185

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

Instance Method Details

#resultObject


189
190
191
192
193
# File 'lib/wings/converter_value_mapper.rb', line 189

def result
  lease = ActiveFedoraConverter.new(resource: Hyrax::Lease.new(**value.last)).convert

  [:lease, lease]
end