Class: Hyrax::VisibilityPropagator::NullVisibilityPropagator
- Inherits:
-
Object
- Object
- Hyrax::VisibilityPropagator::NullVisibilityPropagator
- Defined in:
- app/services/hyrax/visibility_propagator.rb
Overview
Provides a null/logging implementation of the visibility propagator.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(source:) ⇒ NullVisibilityPropagator
constructor
A new instance of NullVisibilityPropagator.
- #propagate ⇒ void
Constructor Details
#initialize(source:) ⇒ NullVisibilityPropagator
Returns a new instance of NullVisibilityPropagator.
32 33 34 |
# File 'app/services/hyrax/visibility_propagator.rb', line 32 def initialize(source:) self.source = source end |
Instance Attribute Details
#source ⇒ #visibility
28 29 30 |
# File 'app/services/hyrax/visibility_propagator.rb', line 28 def source @source end |
Instance Method Details
#propagate ⇒ void
This method returns an undefined value.
39 40 41 42 43 44 45 46 |
# File 'app/services/hyrax/visibility_propagator.rb', line 39 def propagate = "Tried to propagate visibility to members of #{source} " \ "but didn't know what kind of object it is. Model " \ "name #{source.try(:model_name)}. Called from #{caller[0]}." Hyrax.logger.warn() Rails.env.development? ? raise() : :noop end |