Class: Blacklight::Rendering::Pipeline
- Inherits:
-
Object
- Object
- Blacklight::Rendering::Pipeline
- Defined in:
- app/presenters/blacklight/rendering/pipeline.rb
Overview
The field rendering pipeline
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.
-
#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, options) ⇒ Pipeline
constructor
A new instance of Pipeline.
- #render ⇒ Object
-
#stack ⇒ Object
protected
Ordered list of operations, Terminator must be at the end.
Constructor Details
#initialize(values, config, document, context, options) ⇒ Pipeline
Returns a new instance of Pipeline.
10 11 12 13 14 15 16 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 10 def initialize(values, config, document, context, ) @values = values @config = config @document = document @context = context @options = end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
18 19 20 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 18 def config @config end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
18 19 20 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 18 def context @context end |
#document ⇒ Object (readonly)
Returns the value of attribute document.
18 19 20 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 18 def document @document end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
18 19 20 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 18 def @options end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
18 19 20 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 18 def values @values end |
Class Method Details
.render(values, config, document, context, options) ⇒ Object
20 21 22 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 20 def self.render(values, config, document, context, ) new(values, config, document, context, ).render end |
Instance Method Details
#render ⇒ Object
24 25 26 27 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 24 def render first, *rest = *stack first.new(values, config, document, context, , rest).render end |
#stack ⇒ Object (protected)
Ordered list of operations, Terminator must be at the end.
32 33 34 |
# File 'app/presenters/blacklight/rendering/pipeline.rb', line 32 def stack operations + [Terminator] end |