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.
161 162 163 |
# File 'app/services/hyrax/collection_types/create_service.rb', line 161 def initialize(participants) @participants = participants end |
Instance Attribute Details
#participants ⇒ Object (readonly)
159 160 161 |
# File 'app/services/hyrax/collection_types/create_service.rb', line 159 def participants @participants end |
Instance Method Details
#message ⇒ String
167 168 169 170 171 |
# File 'app/services/hyrax/collection_types/create_service.rb', line 167 def @participants.map do |participant| "#{participant[:agent_type]}, #{participant[:agent_id]}, #{participant[:access]}" end.join("--\n") end |