Sha256: a6af9f705f78a7b01dc87e66eed5ce6260d60a15c65994d76e57ac8835ff7644

Contents?: true

Size: 770 Bytes

Versions: 9

Compression:

Stored size: 770 Bytes

Contents

module Hyrax
  module Actors
    # The Hyrax::AbstractActor responds to two primary actions:
    # * #create
    # * #update
    #
    # and the following attributes
    #
    # * next_actor
    # * curation_concern
    # * user
    #
    # it must instantiate the next actor in the chain and instantiate it.
    # it should respond to curation_concern, user and attributes.
    # it ha to next_actor
    class AbstractActor
      attr_reader :next_actor

      def initialize(_curation_concern, _ability, next_actor, ability: nil)
        @next_actor = next_actor
        @ability = ability
      end

      delegate :curation_concern, :user, :ability, to: :next_actor

      delegate :create, to: :next_actor

      delegate :update, to: :next_actor
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hyrax-1.1.1 app/actors/hyrax/actors/abstract_actor.rb
hyrax-1.1.0 app/actors/hyrax/actors/abstract_actor.rb
hyrax-1.0.5 app/actors/hyrax/actors/abstract_actor.rb
hyrax-1.0.4 app/actors/hyrax/actors/abstract_actor.rb
hyrax-1.0.3 app/actors/hyrax/actors/abstract_actor.rb
hyrax-1.0.2 app/actors/hyrax/actors/abstract_actor.rb
hyrax-1.0.1 app/actors/hyrax/actors/abstract_actor.rb
hyrax-1.0.0.rc2 app/actors/hyrax/actors/abstract_actor.rb
hyrax-1.0.0.rc1 app/actors/hyrax/actors/abstract_actor.rb