Class: Hyrax::VisibilityPropagator Abstract

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/visibility_propagator.rb

Overview

This class is abstract.

Propagates visibility from a provided object (e.g. a Work) to some group of its members (e.g. file_sets).

Defined Under Namespace

Classes: NullVisibilityPropagator

Class Method Summary collapse

Class Method Details

.for(source:) ⇒ #propagate

Parameters:

  • source (#visibility)

    the object to propagate visibility from

Returns:

  • (#propagate)


11
12
13
14
15
16
17
18
19
20
# File 'app/services/hyrax/visibility_propagator.rb', line 11

def self.for(source:)
  case source
  when Hyrax::WorkBehavior # ActiveFedora
    FileSetVisibilityPropagator.new(source: source)
  when Hyrax::Resource # Valkyrie
    ResourceVisibilityPropagator.new(source: source)
  else
    NullVisibilityPropagator.new(source: source)
  end
end