Class: Jekyll::Archimate::RelationshipEntity

Inherits:
EntityBase
  • Object
show all
Defined in:
lib/jekyll/archimate/archimate_hook.rb

Overview

Represents an ArchiMate Relationship

Instance Attribute Summary

Attributes inherited from EntityBase

#entity, #model

Instance Method Summary collapse

Methods inherited from EntityBase

#initialize, #to_h

Constructor Details

This class inherits a constructor from Jekyll::Archimate::EntityBase

Instance Method Details

#attr_hashObject



59
60
61
62
63
64
65
66
67
# File 'lib/jekyll/archimate/archimate_hook.rb', line 59

def attr_hash
  super.merge(
    type: "Relationship",
    relationship_type: entity.type,
    source: entity.source&.id,
    target: entity.target&.id,
    views: model.diagrams.select { |dia| dia.relationship_ids.include?(entity.id) }.map(&:id)
  )
end