Class: Lutaml::UmlRepository::Presenters::DiagramPresenter::DiagramRendererWrapper
- Inherits:
-
Object
- Object
- Lutaml::UmlRepository::Presenters::DiagramPresenter::DiagramRendererWrapper
- Defined in:
- lib/lutaml/uml_repository/presenters/diagram_presenter.rb
Overview
Wrapper class to adapt diagram data to SvgRenderer expectations
Instance Attribute Summary collapse
-
#bounds ⇒ Object
readonly
Returns the value of attribute bounds.
-
#connectors ⇒ Object
readonly
Returns the value of attribute connectors.
-
#diagram_data ⇒ Object
readonly
Returns the value of attribute diagram_data.
-
#elements ⇒ Object
readonly
Returns the value of attribute elements.
Instance Method Summary collapse
-
#initialize(diagram_data, layout_engine) ⇒ DiagramRendererWrapper
constructor
A new instance of DiagramRendererWrapper.
Constructor Details
#initialize(diagram_data, layout_engine) ⇒ DiagramRendererWrapper
Returns a new instance of DiagramRendererWrapper.
492 493 494 495 496 497 |
# File 'lib/lutaml/uml_repository/presenters/diagram_presenter.rb', line 492 def initialize(diagram_data, layout_engine) @diagram_data = diagram_data @elements = diagram_data[:elements] || [] @connectors = diagram_data[:connectors] || [] @bounds = layout_engine.calculate_bounds(diagram_data) end |
Instance Attribute Details
#bounds ⇒ Object (readonly)
Returns the value of attribute bounds.
490 491 492 |
# File 'lib/lutaml/uml_repository/presenters/diagram_presenter.rb', line 490 def bounds @bounds end |
#connectors ⇒ Object (readonly)
Returns the value of attribute connectors.
490 491 492 |
# File 'lib/lutaml/uml_repository/presenters/diagram_presenter.rb', line 490 def connectors @connectors end |
#diagram_data ⇒ Object (readonly)
Returns the value of attribute diagram_data.
490 491 492 |
# File 'lib/lutaml/uml_repository/presenters/diagram_presenter.rb', line 490 def diagram_data @diagram_data end |
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
490 491 492 |
# File 'lib/lutaml/uml_repository/presenters/diagram_presenter.rb', line 490 def elements @elements end |