Class: CurationConcerns::Actors::ActorFactory
- Inherits:
-
Object
- Object
- CurationConcerns::Actors::ActorFactory
- Defined in:
- app/services/curation_concerns/actors/actor_factory.rb
Overview
Class Method Summary collapse
- .build(curation_concern, current_user) ⇒ Object
- .model_actor(curation_concern) ⇒ Object
- .stack_actors(curation_concern) ⇒ Object
Class Method Details
.build(curation_concern, current_user) ⇒ Object
4 5 6 7 8 |
# File 'app/services/curation_concerns/actors/actor_factory.rb', line 4 def self.build(curation_concern, current_user) Actors::ActorStack.new(curation_concern, current_user, stack_actors(curation_concern)) end |
.model_actor(curation_concern) ⇒ Object
22 23 24 25 |
# File 'app/services/curation_concerns/actors/actor_factory.rb', line 22 def self.model_actor(curation_concern) actor_identifier = curation_concern.class.to_s.split('::').last "CurationConcerns::Actors::#{actor_identifier}Actor".constantize end |
.stack_actors(curation_concern) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/services/curation_concerns/actors/actor_factory.rb', line 10 def self.stack_actors(curation_concern) [OptimisticLockValidator, AddAsMemberOfCollectionsActor, AddToWorkActor, AssignRepresentativeActor, AttachFilesActor, ApplyOrderActor, InterpretVisibilityActor, model_actor(curation_concern), InitializeWorkflowActor] end |