Class: Ea::Sources::Xmi::ExtensionElements
- Inherits:
-
Object
- Object
- Ea::Sources::Xmi::ExtensionElements
- Defined in:
- lib/ea/sources/xmi/extension_elements.rb
Overview
Walks the xmi:Extension/
The xmi gem exposes the raw rows via Sparx::Diagram::Elements. This class adds EA-aware parsing on top.
Defined Under Namespace
Classes: PlacedConnector, PlacedElement
Instance Attribute Summary collapse
-
#diagram ⇒ Object
readonly
Returns the value of attribute diagram.
Instance Method Summary collapse
-
#initialize(diagram) ⇒ ExtensionElements
constructor
A new instance of ExtensionElements.
- #placed_connectors ⇒ Object
- #placed_elements ⇒ Object
Constructor Details
#initialize(diagram) ⇒ ExtensionElements
Returns a new instance of ExtensionElements.
15 16 17 |
# File 'lib/ea/sources/xmi/extension_elements.rb', line 15 def initialize(diagram) @diagram = diagram end |
Instance Attribute Details
#diagram ⇒ Object (readonly)
Returns the value of attribute diagram.
13 14 15 |
# File 'lib/ea/sources/xmi/extension_elements.rb', line 13 def diagram @diagram end |
Instance Method Details
#placed_connectors ⇒ Object
23 24 25 |
# File 'lib/ea/sources/xmi/extension_elements.rb', line 23 def placed_connectors rows.filter_map { |row| build_placed_connector(row) } end |
#placed_elements ⇒ Object
19 20 21 |
# File 'lib/ea/sources/xmi/extension_elements.rb', line 19 def placed_elements rows.filter_map { |row| build_placed_element(row) } end |