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.


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

def initialize(participants)
  @participants = participants
end

Instance Attribute Details

#participantsObject (readonly)


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

def participants
  @participants
end

Instance Method Details

#messageString

Returns:

  • (String)

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

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