Class: Diagrams::Elements::Event

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

Overview

Represents an event, potentially used in State Diagrams or others.

Instance Method Summary collapse

Instance Method Details

#to_hHash{Symbol => String | nil}

Returns a hash representation suitable for serialization.

Returns:

  • (Hash{Symbol => String | nil})


16
17
18
19
# File 'lib/diagrams/elements/event.rb', line 16

def to_h
  # Start with Dry::Struct's hash and drop nil attributes.
  super.compact
end