Class: AASMMermaid::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/aasm_mermaid/event.rb

Overview

Handles AASM event mapping to diagram transition rows

Instance Method Summary collapse

Constructor Details

#initialize(aasm_event:) ⇒ Event

Returns a new instance of Event.

Parameters:

  • aasm_event (AASM::Event)
    • AASM event to map



8
9
10
# File 'lib/aasm_mermaid/event.rb', line 8

def initialize(aasm_event:)
  self.aasm_event = aasm_event
end

Instance Method Details

#transitionsArray<AASMMermaid::Transition>

Returns array of mermaid transition rows.

Returns:



13
14
15
16
17
# File 'lib/aasm_mermaid/event.rb', line 13

def transitions
  return @transitions if @transitions

  @transitions = mapped_transitions
end