Exception: Hyrax::CollectionTypes::CreateService::InvalidParticipantError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Hyrax::CollectionTypes::CreateService::InvalidParticipantError
- Defined in:
- app/services/hyrax/collection_types/create_service.rb
Overview
An error class for the case that invalid/incomplete participants are added to a collection type.
Instance Attribute Summary collapse
- #participants ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(participants) ⇒ InvalidParticipantError
constructor
A new instance of InvalidParticipantError.
- #message ⇒ String
Constructor Details
#initialize(participants) ⇒ InvalidParticipantError
Returns a new instance of InvalidParticipantError.
160 161 162 |
# File 'app/services/hyrax/collection_types/create_service.rb', line 160 def initialize(participants) @participants = participants end |
Instance Attribute Details
#participants ⇒ Object (readonly)
158 159 160 |
# File 'app/services/hyrax/collection_types/create_service.rb', line 158 def participants @participants end |
Instance Method Details
#message ⇒ String
166 167 168 169 170 |
# File 'app/services/hyrax/collection_types/create_service.rb', line 166 def @participants.map do |participant| "#{participant[:agent_type]}, #{participant[:agent_id]}, #{participant[:access]}" end.join("--\n") end |