Class: Burner::Modeling::AttributeRenderer
- Inherits:
-
Object
- Object
- Burner::Modeling::AttributeRenderer
- Extended by:
- Forwardable
- Defined in:
- lib/burner/modeling/attribute_renderer.rb
Overview
Composed of an Attribute instance and a Pipeline instance. It knows how to render/transform an Attribute. Since this library is data-first, these intermediary objects are necessary for non-data-centric modeling.
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#pipeline ⇒ Object
readonly
Returns the value of attribute pipeline.
Instance Method Summary collapse
-
#initialize(attribute, resolver) ⇒ AttributeRenderer
constructor
A new instance of AttributeRenderer.
Constructor Details
#initialize(attribute, resolver) ⇒ AttributeRenderer
Returns a new instance of AttributeRenderer.
24 25 26 27 28 29 |
# File 'lib/burner/modeling/attribute_renderer.rb', line 24 def initialize(attribute, resolver) @attribute = attribute @pipeline = Realize::Pipeline.new(attribute.transformers, resolver: resolver) freeze end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
18 19 20 |
# File 'lib/burner/modeling/attribute_renderer.rb', line 18 def attribute @attribute end |
#pipeline ⇒ Object (readonly)
Returns the value of attribute pipeline.
18 19 20 |
# File 'lib/burner/modeling/attribute_renderer.rb', line 18 def pipeline @pipeline end |