Class: Diagrams::Elements::Edge
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Diagrams::Elements::Edge
- Includes:
- Types
- Defined in:
- lib/diagrams/elements/edge.rb
Overview
Represents an edge or link between two nodes in a diagram. Typically connects nodes via their IDs and can have an optional label.
Instance Method Summary collapse
-
#to_h ⇒ Hash{Symbol => String | nil}
Returns a hash representation suitable for serialization.
Instance Method Details
#to_h ⇒ Hash{Symbol => String | nil}
Returns a hash representation suitable for serialization.
21 22 23 24 |
# File 'lib/diagrams/elements/edge.rb', line 21 def to_h # Start with Dry::Struct's hash and drop nil attributes. super.compact end |