Class: Hyrax::Actors::InterpretVisibilityActor

Inherits:
AbstractActor show all
Defined in:
app/actors/hyrax/actors/interpret_visibility_actor.rb

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 Hyrax::Actors::AbstractActor

Instance Method Details

#create(attributes) ⇒ Object



82
83
84
85
86
# File 'app/actors/hyrax/actors/interpret_visibility_actor.rb', line 82

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

#update(attributes) ⇒ Object



88
89
90
91
92
# File 'app/actors/hyrax/actors/interpret_visibility_actor.rb', line 88

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