Class: Sipity::Models::Collaborator

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/sipity/models/collaborator.rb

Overview

A collaborator (as per metadata not improving on the SIP) for the underlying work's SIP.

Constant Summary collapse

AUTHOR_ROLE =
DEFAULT_ROLE = 'author'.freeze
ADVISOR_ROLE =
'advisor'.freeze
CONTRIBUTOR_ROLE =
'contributor'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build_defaultObject



11
12
13
# File 'app/models/sipity/models/collaborator.rb', line 11

def self.build_default
  new(role: DEFAULT_ROLE)
end

Instance Method Details

#possible_rolesObject



38
39
40
# File 'app/models/sipity/models/collaborator.rb', line 38

def possible_roles
  self.class.roles
end