Class: DorIndexing::Builders::CollectionRightsDescriptionBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/dor_indexing/builders/collection_rights_description_builder.rb

Overview

Rights description builder for collections

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cocina) ⇒ CollectionRightsDescriptionBuilder

Returns a new instance of CollectionRightsDescriptionBuilder.



11
12
13
# File 'lib/dor_indexing/builders/collection_rights_description_builder.rb', line 11

def initialize(cocina)
  @cocina = cocina
end

Class Method Details

.build(cocina) ⇒ Object



7
8
9
# File 'lib/dor_indexing/builders/collection_rights_description_builder.rb', line 7

def self.build(cocina)
  new(cocina).build
end

Instance Method Details

#buildObject



15
16
17
18
19
20
21
22
# File 'lib/dor_indexing/builders/collection_rights_description_builder.rb', line 15

def build
  case cocina.access.view
  when 'world'
    'world'
  else
    'dark'
  end
end