Class: Ea::Svg::EaEmitter::Marker::Kind
- Inherits:
-
Object
- Object
- Ea::Svg::EaEmitter::Marker::Kind
- Defined in:
- lib/ea/svg/ea_emitter/marker/kind.rb
Overview
Base class for marker kinds. Subclasses declare which connector types they handle and produce Spec instances describing the marker geometry.
Direct Known Subclasses
Class Method Summary collapse
-
.handles?(_effective_type) ⇒ Boolean
Returns true if this kind handles the given effective connector type (e.g. "Aggregation", "Generalization").
-
.specs_for(_connector, _source, _target, _before_target, _after_source, relationship: nil) ⇒ Object
Returns an Array of Spec instances describing the markers to emit.
-
.whole_end_at_source?(connector) ⇒ Boolean
Common helper: "destination → source" direction means the whole end of an aggregation is at the target end.
Class Method Details
.handles?(_effective_type) ⇒ Boolean
Returns true if this kind handles the given effective connector type (e.g. "Aggregation", "Generalization").
13 14 15 |
# File 'lib/ea/svg/ea_emitter/marker/kind.rb', line 13 def self.handles?(_effective_type) false end |
.specs_for(_connector, _source, _target, _before_target, _after_source, relationship: nil) ⇒ Object
Returns an Array of Spec instances describing the
markers to emit. Each Spec has :shape, :anchor, :base.
relationship is the resolved relationship model (e.g.
Association) when available, nil otherwise.
21 22 23 24 |
# File 'lib/ea/svg/ea_emitter/marker/kind.rb', line 21 def self.specs_for(_connector, _source, _target, _before_target, _after_source, relationship: nil) [] end |
.whole_end_at_source?(connector) ⇒ Boolean
Common helper: "destination → source" direction means the whole end of an aggregation is at the target end.
28 29 30 |
# File 'lib/ea/svg/ea_emitter/marker/kind.rb', line 28 def self.whole_end_at_source?(connector) connector.direction != "Destination -> Source" end |