Class: Burner::Modeling::AttributeRenderer

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#attributeObject (readonly)

Returns the value of attribute attribute.



18
19
20
# File 'lib/burner/modeling/attribute_renderer.rb', line 18

def attribute
  @attribute
end

#pipelineObject (readonly)

Returns the value of attribute pipeline.



18
19
20
# File 'lib/burner/modeling/attribute_renderer.rb', line 18

def pipeline
  @pipeline
end