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