Class: Hyrax::Actors::Environment
- Inherits:
-
Object
- Object
- Hyrax::Actors::Environment
- Defined in:
- app/actors/hyrax/actors/environment.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#curation_concern ⇒ Object
readonly
Returns the value of attribute curation_concern.
-
#current_ability ⇒ Object
readonly
Returns the value of attribute current_ability.
Instance Method Summary collapse
-
#initialize(curation_concern, current_ability, attributes) ⇒ Environment
constructor
A new instance of Environment.
-
#user ⇒ User
The user from the current_ability.
Constructor Details
#initialize(curation_concern, current_ability, attributes) ⇒ Environment
Returns a new instance of Environment.
7 8 9 10 11 |
# File 'app/actors/hyrax/actors/environment.rb', line 7 def initialize(curation_concern, current_ability, attributes) @curation_concern = curation_concern @current_ability = current_ability @attributes = attributes.to_h.with_indifferent_access end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
13 14 15 |
# File 'app/actors/hyrax/actors/environment.rb', line 13 def attributes @attributes end |
#curation_concern ⇒ Object (readonly)
Returns the value of attribute curation_concern.
13 14 15 |
# File 'app/actors/hyrax/actors/environment.rb', line 13 def curation_concern @curation_concern end |
#current_ability ⇒ Object (readonly)
Returns the value of attribute current_ability.
13 14 15 |
# File 'app/actors/hyrax/actors/environment.rb', line 13 def current_ability @current_ability end |
Instance Method Details
#user ⇒ User
Returns the user from the current_ability.
16 17 18 |
# File 'app/actors/hyrax/actors/environment.rb', line 16 def user current_ability.current_user end |