Class: Hyrax::Actors::Environment
- Inherits:
-
Object
- Object
- Hyrax::Actors::Environment
- Defined in:
- app/actors/hyrax/actors/environment.rb
Instance Attribute Summary collapse
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.
8 9 10 11 12 |
# File 'app/actors/hyrax/actors/environment.rb', line 8 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 ⇒ Hash
21 22 23 |
# File 'app/actors/hyrax/actors/environment.rb', line 21 def attributes @attributes end |
#curation_concern ⇒ Object
21 |
# File 'app/actors/hyrax/actors/environment.rb', line 21 attr_accessor :attributes, :curation_concern, :current_ability |
#current_ability ⇒ Hyrax::Ability
21 |
# File 'app/actors/hyrax/actors/environment.rb', line 21 attr_accessor :attributes, :curation_concern, :current_ability |
Instance Method Details
#user ⇒ User
Returns the user from the current_ability.
24 25 26 |
# File 'app/actors/hyrax/actors/environment.rb', line 24 def user current_ability.current_user end |