Class: AASMMermaid::Diagram
- Inherits:
-
Object
- Object
- AASMMermaid::Diagram
- Defined in:
- lib/aasm_mermaid/diagram.rb
Overview
Mermaid diagram
Instance Method Summary collapse
-
#generate ⇒ String
Mermaid diagram string.
-
#initialize(aasm:) ⇒ Diagram
constructor
A new instance of Diagram.
Constructor Details
#initialize(aasm:) ⇒ Diagram
Returns a new instance of Diagram.
8 9 10 |
# File 'lib/aasm_mermaid/diagram.rb', line 8 def initialize(aasm:) self.aasm = aasm end |
Instance Method Details
#generate ⇒ String
Returns Mermaid diagram string.
13 14 15 |
# File 'lib/aasm_mermaid/diagram.rb', line 13 def generate "stateDiagram-v2\n#{transitions_string}" end |