Class: Ea::Export::PlantUml::Generator
- Inherits:
-
Object
- Object
- Ea::Export::PlantUml::Generator
- Defined in:
- lib/ea/export/plantuml/generator.rb
Overview
Generates PlantUML class diagram text from a parsed QEA model.
Emits:
- Package nesting (
package "X" { ... }) - Class declarations with attributes and operations
- Generalizations (
Parent <|-- Child) - Associations with multiplicities and role names
- Enumerations as
enumblocks
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(model) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(model) ⇒ Generator
Returns a new instance of Generator.
21 22 23 |
# File 'lib/ea/export/plantuml/generator.rb', line 21 def initialize(model) @model = model end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
19 20 21 |
# File 'lib/ea/export/plantuml/generator.rb', line 19 def model @model end |
Class Method Details
.call(model, **_opts) ⇒ Object
15 16 17 |
# File 'lib/ea/export/plantuml/generator.rb', line 15 def self.call(model, **_opts) new(model).call end |
Instance Method Details
#call ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/ea/export/plantuml/generator.rb', line 25 def call lines = ["@startuml", "skinparam classAttributeIconSize 0"] lines.concat(package_lines) lines.concat(connector_lines) lines << "@enduml" lines.join("\n") + "\n" end |