Module: Ea::Svg::EaEmitter::Marker
- Defined in:
- lib/ea/svg/ea_emitter/marker.rb,
lib/ea/svg/ea_emitter/marker/kind.rb,
lib/ea/svg/ea_emitter/marker/plus.rb,
lib/ea/svg/ea_emitter/marker/diamond.rb,
lib/ea/svg/ea_emitter/marker/registry.rb,
lib/ea/svg/ea_emitter/marker/arrow_path.rb,
lib/ea/svg/ea_emitter/marker/open_triangle.rb,
lib/ea/svg/ea_emitter/marker/package_import.rb
Overview
Marker dispatch registry. Each Kind subclass handles one
connector type (or family) and produces the marker specs.
Adding a new marker kind = creating a class + registering
it (OCP).
Defined Under Namespace
Classes: ArrowPath, Diamond, Kind, OpenTriangle, PackageImport, Plus, Registry
Class Method Summary collapse
-
.ensure_builtins_registered! ⇒ Object
Built-in marker kinds register themselves at the bottom of their respective files.
Class Method Details
.ensure_builtins_registered! ⇒ Object
Built-in marker kinds register themselves at the bottom of their respective files. Referencing each constant here forces autoload, which runs the per-file registration lines. Diamond first so "Aggregation" wins over generic fallback.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ea/svg/ea_emitter/marker.rb', line 23 def self.ensure_builtins_registered! # Touch the constants to trigger autoload + registration. # Each constant is autoloaded, so merely referencing it # causes the file to load. Registration lines at the # bottom of each file then add the kind to the Registry. Diamond OpenTriangle Plus ArrowPath PackageImport end |