Class: Ea::Svg::EaEmitter::Marker::OpenTriangle
- Defined in:
- lib/ea/svg/ea_emitter/marker/open_triangle.rb
Overview
Open triangle marker for UML generalization, realization, and dependency. White-filled 3-point polygon at the general / supplier end.
Class Method Summary collapse
- .handles?(effective_type) ⇒ Boolean
- .specs_for(connector, source, target, before_target, after_source, relationship: nil) ⇒ Object
Methods inherited from Kind
Class Method Details
.handles?(effective_type) ⇒ Boolean
11 12 13 |
# File 'lib/ea/svg/ea_emitter/marker/open_triangle.rb', line 11 def self.handles?(effective_type) %w[Generalization Realization Dependency].include?(effective_type) end |
.specs_for(connector, source, target, before_target, after_source, relationship: nil) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/ea/svg/ea_emitter/marker/open_triangle.rb', line 15 def self.specs_for(connector, source, target, before_target, after_source, relationship: nil) whole_end_at_source = whole_end_at_source?(connector) anchor = whole_end_at_source ? target : source base = whole_end_at_source ? before_target : after_source [Registry::Spec.new(shape: :triangle, anchor: anchor, base: base)] end |