Exception: Hyrax::CollectionTypes::CreateService::InvalidParticipantError

Inherits:
RuntimeError
  • Object
show all
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

Instance Method Summary collapse

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

#participantsObject (readonly)



159
160
161
# File 'app/services/hyrax/collection_types/create_service.rb', line 159

def participants
  @participants
end

Instance Method Details

#messageString

Returns:

  • (String)


167
168
169
170
171
# File 'app/services/hyrax/collection_types/create_service.rb', line 167

def message
  @participants.map do |participant|
    "#{participant[:agent_type]}, #{participant[:agent_id]}, #{participant[:access]}"
  end.join("--\n")
end