Class: CurationConcerns::Actors::InterpretVisibilityActor

Inherits:
AbstractActor
  • Object
show all
Defined in:
app/actors/curation_concerns/actors/interpret_visibility_actor.rb

Overview

Since:

  • 0.14.0

Defined Under Namespace

Classes: Intention

Instance Attribute Summary

Attributes inherited from AbstractActor

#next_actor

Instance Method Summary collapse

Methods inherited from AbstractActor

#initialize

Constructor Details

This class inherits a constructor from CurationConcerns::Actors::AbstractActor

Instance Method Details

#create(attributes) ⇒ Object

Since:

  • 0.14.0



70
71
72
73
74
# File 'app/actors/curation_concerns/actors/interpret_visibility_actor.rb', line 70

def create(attributes)
  @intention = Intention.new(attributes)
  attributes = @intention.sanitize_params
  validate && apply_visibility(attributes) && next_actor.create(attributes)
end

#update(attributes) ⇒ Object

Since:

  • 0.14.0



76
77
78
79
80
# File 'app/actors/curation_concerns/actors/interpret_visibility_actor.rb', line 76

def update(attributes)
  @intention = Intention.new(attributes)
  attributes = @intention.sanitize_params
  validate && apply_visibility(attributes) && next_actor.update(attributes)
end