Class: Diagrams::Elements::TimelinePeriod
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Diagrams::Elements::TimelinePeriod
- Includes:
- Types
- Defined in:
- lib/diagrams/elements/timeline_period.rb
Overview
Represents a specific time period on the timeline, containing one or more events.
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/timeline_period.rb', line 15 def to_h { label:, events: events.map(&:to_h) } end |