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.
458 459 460 461 462 463 |
# File 'lib/lutaml/uml_repository/presenters/diagram_presenter.rb', line 458 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.
456 457 458 |
# File 'lib/lutaml/uml_repository/presenters/diagram_presenter.rb', line 456 def bounds @bounds end |
#connectors ⇒ Object (readonly)
Returns the value of attribute connectors.
456 457 458 |
# File 'lib/lutaml/uml_repository/presenters/diagram_presenter.rb', line 456 def connectors @connectors end |
#diagram_data ⇒ Object (readonly)
Returns the value of attribute diagram_data.
456 457 458 |
# File 'lib/lutaml/uml_repository/presenters/diagram_presenter.rb', line 456 def diagram_data @diagram_data end |
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
456 457 458 |
# File 'lib/lutaml/uml_repository/presenters/diagram_presenter.rb', line 456 def elements @elements end |