Class: Archimate::Export::JsonlEdge
- Inherits:
-
Object
- Object
- Archimate::Export::JsonlEdge
- Defined in:
- lib/archimate/export/jsonl.rb
Instance Attribute Summary collapse
-
#relationship ⇒ Object
readonly
Returns the value of attribute relationship.
Instance Method Summary collapse
-
#initialize(relationship) ⇒ JsonlEdge
constructor
A new instance of JsonlEdge.
- #to_jsonl ⇒ Object
Constructor Details
#initialize(relationship) ⇒ JsonlEdge
Returns a new instance of JsonlEdge.
91 92 93 |
# File 'lib/archimate/export/jsonl.rb', line 91 def initialize(relationship) @relationship = relationship end |
Instance Attribute Details
#relationship ⇒ Object (readonly)
Returns the value of attribute relationship.
89 90 91 |
# File 'lib/archimate/export/jsonl.rb', line 89 def relationship @relationship end |
Instance Method Details
#to_jsonl ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/archimate/export/jsonl.rb', line 95 def to_jsonl Export.clean_json( _key: relationship.id, _from: relationship.source, _to: relationship.target, name: relationship.name&.to_s, type: relationship.type, accessType: relationship.access_type, documentation: relationship.documentation&.to_s, properties: PropertiesHash.new(relationship.properties).to_h, weight: relationship.weight ) end |