Class: Diagrams::Elements::ERDEntity
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Diagrams::Elements::ERDEntity
- Includes:
- Types
- Defined in:
- lib/diagrams/elements/erd_entity.rb
Overview
Represents an entity (table) in an ER Diagram.
Instance Method Summary collapse
-
#to_h ⇒ Hash{Symbol => String | Array<Hash>}
Returns a hash representation suitable for serialization.
Instance Method Details
#to_h ⇒ Hash{Symbol => String | Array<Hash>}
Returns a hash representation suitable for serialization.
15 16 17 18 19 20 |
# File 'lib/diagrams/elements/erd_entity.rb', line 15 def to_h { name: name, attributes: entity_attributes.map(&:to_h) # Renamed variable } end |