Class: Diagrams::Elements::ClassEntity

Inherits:
Dry::Struct
  • Object
show all
Includes:
Types
Defined in:
lib/diagrams/elements/class_entity.rb

Overview

Represents a class entity in a UML Class Diagram.

Instance Method Summary collapse

Instance Method Details

#to_hHash{Symbol => String | Array<String>}

Returns a hash representation suitable for serialization.

Returns:

  • (Hash{Symbol => String | Array<String>})


22
23
24
25
26
27
28
# File 'lib/diagrams/elements/class_entity.rb', line 22

def to_h
  {
    name:,
    attributes: self[:attributes],
    methods: self[:methods]
  }
end