Class: Lutaml::Xsd::Spa::Svg::ComponentRenderer
- Inherits:
-
Object
- Object
- Lutaml::Xsd::Spa::Svg::ComponentRenderer
- Defined in:
- lib/lutaml/xsd/spa/svg/component_renderer.rb
Overview
Abstract base class for component renderers Subclasses must implement #render method
Direct Known Subclasses
Renderers::AttributeRenderer, Renderers::ElementRenderer, Renderers::GroupRenderer, Renderers::TypeRenderer
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#schema_name ⇒ Object
readonly
Returns the value of attribute schema_name.
Instance Method Summary collapse
-
#initialize(config, schema_name) ⇒ ComponentRenderer
constructor
A new instance of ComponentRenderer.
-
#render(component_data, box) ⇒ String
Renders a component at the given position.
Constructor Details
#initialize(config, schema_name) ⇒ ComponentRenderer
Returns a new instance of ComponentRenderer.
14 15 16 17 |
# File 'lib/lutaml/xsd/spa/svg/component_renderer.rb', line 14 def initialize(config, schema_name) @config = config @schema_name = schema_name end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
12 13 14 |
# File 'lib/lutaml/xsd/spa/svg/component_renderer.rb', line 12 def config @config end |
#schema_name ⇒ Object (readonly)
Returns the value of attribute schema_name.
12 13 14 |
# File 'lib/lutaml/xsd/spa/svg/component_renderer.rb', line 12 def schema_name @schema_name end |
Instance Method Details
#render(component_data, box) ⇒ String
Renders a component at the given position
23 24 25 |
# File 'lib/lutaml/xsd/spa/svg/component_renderer.rb', line 23 def render(component_data, box) raise NotImplementedError, "#{self.class} must implement #render" end |