Introducing the mindmapdoc gem
require 'logger'
require 'mindmapdoc'
s = "
breakfast
porridge
coffee
lunch
pizza
dinner
cheese burgers
"
mmd = MindmapDoc.new(s, root: 'today')
puts mmd.to_doc
Markdown document output
# Today ## Breakfast ### Porridge ### Coffee ## Lunch ### Pizza ## Dinner ### Cheese burgers
mmd.to_svg
SVG Output
Importing a markdown document
s2 = "
# Today
## Breakfast
### Porridge
### Coffee
## Lunch
### Pizza
## Dinner
### Cheese burgers
"
mmd = MindmapDoc.new(s2)
mmd.root #=> Today
mmd.to_s
Tree Output
Breakfast Porridge Coffee Lunch Pizza Dinner Cheese burgers
Resources
- mindmapdoc https://rubygems.org/gems/mindmapdoc
mindmap mindmapdoc gem