Class: Blacklight::Rendering::Pipeline
- Inherits:
-
Object
- Object
- Blacklight::Rendering::Pipeline
- Defined in:
- app/presenters/blacklight/rendering/pipeline.rb
Overview
The field rendering pipeline. This takes a field and its values and transforms them through a list of operations.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#document ⇒ Object
readonly
Returns the value of attribute document.
-
#operations ⇒ Object
readonly
Returns the value of attribute operations.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(values, config, document, context, operations, options) ⇒ Pipeline
constructor
A new instance of Pipeline.
-
#render ⇒ Object
Perform the processing by the pipeline.
Constructor Details
#initialize(values, config, document, context, operations, options) ⇒ Pipeline
Returns a new instance of Pipeline.
20 21 22 23 24 25 26 27 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 20 def initialize(values, config, document, context, operations, ) @values = values @config = config @document = document @context = context @operations = operations @options = end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
29 30 31 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 29 def config @config end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
29 30 31 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 29 def context @context end |
#document ⇒ Object (readonly)
Returns the value of attribute document.
29 30 31 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 29 def document @document end |
#operations ⇒ Object (readonly)
Returns the value of attribute operations.
29 30 31 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 29 def operations @operations end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
29 30 31 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 29 def @options end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
29 30 31 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 29 def values @values end |
Class Method Details
.render(values, config, document, context, options) ⇒ Object
36 37 38 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 36 def self.render(values, config, document, context, ) new(values, config, document, context, operations, ).render end |
Instance Method Details
#render ⇒ Object
Perform the processing by the pipeline
41 42 43 44 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 41 def render first, *rest = *stack first.new(values, config, document, context, , rest).render end |