Class: Diagrams::Elements::Transition
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Diagrams::Elements::Transition
- Includes:
- Types
- Defined in:
- lib/diagrams/elements/transition.rb
Overview
Represents a transition between two states in a State 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.
21 22 23 24 |
# File 'lib/diagrams/elements/transition.rb', line 21 def to_h # Start with Dry::Struct's hash and drop nil attributes. super.compact end |