Class: Hyrax::VisibilityPropagator::NullVisibilityPropogator
- Inherits:
-
Object
- Object
- Hyrax::VisibilityPropagator::NullVisibilityPropogator
- Defined in:
- app/services/hyrax/visibility_propagator.rb
Overview
Provides a null/logging implementation of the visibility propogator.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(source:) ⇒ NullVisibilityPropogator
constructor
A new instance of NullVisibilityPropogator.
- #propogate ⇒ void
Constructor Details
#initialize(source:) ⇒ NullVisibilityPropogator
Returns a new instance of NullVisibilityPropogator.
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
#propogate ⇒ 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 propogate = "Tried to propogate 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 |