Class: Ea::Svg::EaEmitter::Element::HeaderLineProvider::InstanceSpec
- Inherits:
-
Object
- Object
- Ea::Svg::EaEmitter::Element::HeaderLineProvider::InstanceSpec
- Defined in:
- lib/ea/svg/ea_emitter/element/header_line_provider/instance_spec.rb
Overview
InstanceSpecification: short-circuits the pipeline. The entire header for an instance is "name: Classifier" on one bold line. No stereotype, no wrap, no parent ghost.
Class Method Summary collapse
Class Method Details
.call(context) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ea/svg/ea_emitter/element/header_line_provider/instance_spec.rb', line 12 def self.call(context) inst = context.classifier return [] unless inst.is_a?(Ea::Model::InstanceSpecification) label = inst.name.to_s if inst.classifier_name && !inst.classifier_name.empty? label = "#{label}: #{inst.classifier_name}" end [[label, :bold]] end |