Class: Diagrams::Elements::Relationship
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Diagrams::Elements::Relationship
- Includes:
- Types
- Defined in:
- lib/diagrams/elements/relationship.rb
Overview
Represents a relationship (e.g., association, inheritance) between two classes in a UML Class Diagram.
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.
27 28 29 30 |
# File 'lib/diagrams/elements/relationship.rb', line 27 def to_h # Start with Dry::Struct's hash and drop nil attributes. super.compact end |