Module: Ea::Svg::EaEmitter::Compartment
- Defined in:
- lib/ea/svg/ea_emitter/compartment.rb,
lib/ea/svg/ea_emitter/compartment/shape.rb,
lib/ea/svg/ea_emitter/compartment/header.rb,
lib/ea/svg/ea_emitter/compartment/note_body.rb,
lib/ea/svg/ea_emitter/compartment/note_text.rb,
lib/ea/svg/ea_emitter/compartment/attributes.rb,
lib/ea/svg/ea_emitter/compartment/operations.rb,
lib/ea/svg/ea_emitter/compartment/constraints.rb,
lib/ea/svg/ea_emitter/compartment/enum_literals.rb,
lib/ea/svg/ea_emitter/compartment/tagged_values.rb,
lib/ea/svg/ea_emitter/compartment/header_divider.rb,
lib/ea/svg/ea_emitter/compartment/instance_slots.rb,
lib/ea/svg/ea_emitter/compartment/stereotype_icon.rb,
lib/ea/svg/ea_emitter/compartment/package_contents.rb,
lib/ea/svg/ea_emitter/compartment/instance_underline.rb,
lib/ea/svg/ea_emitter/compartment/package_from_parent.rb
Overview
Compartment pipeline. Each Compartment is a small, single-purpose renderer that decides whether it applies to the current RenderContext and, if so, emits its SVG layer.
Adding a new compartment = adding a class to COMPARTMENTS.
The Elements orchestrator does not change — OCP-friendly.
Defined Under Namespace
Modules: Attributes, Constraints, EnumLiterals, Header, HeaderDivider, InstanceSlots, InstanceUnderline, NoteBody, NoteText, Operations, PackageContents, PackageFromParent, Shape, StereotypeIcon, TaggedValues
Constant Summary collapse
- ALL =
Order matters: EA emits compartments top-to-bottom inside each element group.
[ Shape, NoteBody, Header, HeaderDivider, StereotypeIcon, Attributes, Operations, EnumLiterals, TaggedValues, Constraints, PackageContents, InstanceSlots, NoteText, PackageFromParent, InstanceUnderline ].freeze
Class Method Summary collapse
-
.render_all(context) ⇒ Object
Renders every applicable compartment for the context.
Class Method Details
.render_all(context) ⇒ Object
Renders every applicable compartment for the context. Returns an Array of SVG strings (some may be nil; the caller compacts).
54 55 56 |
# File 'lib/ea/svg/ea_emitter/compartment.rb', line 54 def render_all(context) ALL.map { |compartment| compartment.render(context) } end |