Class: CurationConcern::BaseActor
- Inherits:
-
Object
- Object
- CurationConcern::BaseActor
- Defined in:
- app/services/curation_concern/base_actor.rb
Overview
The CurationConcern base actor should respond to three primary actions:
-
#create
-
#update
-
#delete
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#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.
8 9 10 11 12 13 |
# File 'app/services/curation_concern/base_actor.rb', line 8 def initialize(curation_concern, user, input_attributes) @curation_concern = curation_concern @user = user @attributes = input_attributes.dup.with_indifferent_access @visibility = attributes[:visibility] end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
7 8 9 |
# File 'app/services/curation_concern/base_actor.rb', line 7 def attributes @attributes end |
#curation_concern ⇒ Object (readonly)
Returns the value of attribute curation_concern.
7 8 9 |
# File 'app/services/curation_concern/base_actor.rb', line 7 def curation_concern @curation_concern end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
7 8 9 |
# File 'app/services/curation_concern/base_actor.rb', line 7 def user @user end |
Instance Method Details
#create ⇒ Object
20 21 22 23 24 |
# File 'app/services/curation_concern/base_actor.rb', line 20 def create apply_creation_data_to_curation_concern apply_save_data_to_curation_concern save end |
#update ⇒ Object
26 27 28 29 30 |
# File 'app/services/curation_concern/base_actor.rb', line 26 def update apply_update_data_to_curation_concern apply_save_data_to_curation_concern save end |