Class: Hyrax::Transactions::Steps::SetDefaultAdminSet
- Inherits:
-
Object
- Object
- Hyrax::Transactions::Steps::SetDefaultAdminSet
- Defined in:
- lib/hyrax/transactions/steps/set_default_admin_set.rb
Overview
A step that sets the ‘AdminSet` for an input work to the default admin set if none is already set. Creates the default admin set if it doesn’t already exist.
Instance Method Summary collapse
Instance Method Details
#call(obj) ⇒ Dry::Monads::Result
18 19 20 21 22 |
# File 'lib/hyrax/transactions/steps/set_default_admin_set.rb', line 18 def call(obj) obj.admin_set_id ||= Hyrax::EnsureWellFormedAdminSetService.call Success(obj) end |