Sha256: c947708c7a1f987e2534cb596a9fce34dee64679a3d5ee141f97c7a25ca03868

Contents?: true

Size: 779 Bytes

Versions: 19

Compression:

Stored size: 779 Bytes

Contents

module CurationConcerns
  module Actors
    class ActorFactory
      def self.build(curation_concern, current_user)
        Actors::ActorStack.new(curation_concern,
                               current_user,
                               stack_actors(curation_concern))
      end

      def self.stack_actors(curation_concern)
        [AddToCollectionActor,
         AddToWorkActor,
         AssignRepresentativeActor,
         AttachFilesActor,
         ApplyOrderActor,
         InterpretVisibilityActor,
         model_actor(curation_concern)]
      end

      def self.model_actor(curation_concern)
        actor_identifier = curation_concern.class.to_s.split('::').last
        "CurationConcerns::Actors::#{actor_identifier}Actor".constantize
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
curation_concerns-1.6.3 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.6.2 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.6.1 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.6.0 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.5.0 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.4.0 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.3.3 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.3.2 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.3.1 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.3.0 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.2.0 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.1.2 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.1.1 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.1.0 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.0.0 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.0.0.beta10 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.0.0.beta9 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.0.0.beta8 app/services/curation_concerns/actors/actor_factory.rb
curation_concerns-1.0.0.beta7 app/services/curation_concerns/actors/actor_factory.rb