Class: CurationConcerns::BaseActor
- Inherits:
-
Object
- Object
- CurationConcerns::BaseActor
- Defined in:
- app/actors/curation_concerns/base_actor.rb
Overview
The CurationConcern base actor should respond to three primary actions:
-
#create
-
#update
-
#delete
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#cloud_resources ⇒ Object
readonly
Returns the value of attribute cloud_resources.
-
#curation_concern ⇒ Object
readonly
Returns the value of attribute curation_concern.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(curation_concern, user, input_attributes) ⇒ BaseActor
constructor
A new instance of BaseActor.
- #update ⇒ Object
Constructor Details
#initialize(curation_concern, user, input_attributes) ⇒ BaseActor
Returns a new instance of BaseActor.
9 10 11 12 13 14 15 |
# File 'app/actors/curation_concerns/base_actor.rb', line 9 def initialize(curation_concern, user, input_attributes) @curation_concern = curation_concern @user = user @attributes = input_attributes.dup.with_indifferent_access @visibility = attributes[:visibility] @cloud_resources = attributes.delete(:cloud_resources.to_s) end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
8 9 10 |
# File 'app/actors/curation_concerns/base_actor.rb', line 8 def attributes @attributes end |
#cloud_resources ⇒ Object (readonly)
Returns the value of attribute cloud_resources.
8 9 10 |
# File 'app/actors/curation_concerns/base_actor.rb', line 8 def cloud_resources @cloud_resources end |
#curation_concern ⇒ Object (readonly)
Returns the value of attribute curation_concern.
8 9 10 |
# File 'app/actors/curation_concerns/base_actor.rb', line 8 def curation_concern @curation_concern end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
8 9 10 |
# File 'app/actors/curation_concerns/base_actor.rb', line 8 def user @user end |
Instance Method Details
#create ⇒ Object
22 23 24 25 26 |
# File 'app/actors/curation_concerns/base_actor.rb', line 22 def create apply_creation_data_to_curation_concern apply_save_data_to_curation_concern save end |
#update ⇒ Object
28 29 30 31 32 |
# File 'app/actors/curation_concerns/base_actor.rb', line 28 def update apply_update_data_to_curation_concern apply_save_data_to_curation_concern save end |