I want to store some configuration information about a few apps so I can make an 'app drawer'. I store the info in an array that looks like this -
[["page_view", {"path"=>"somepath/asdf/asdf", "name"=>"Page View"}], ["outage_impact", {"path"=>"newpath/asdf/asdf", "name"=>"Outage Impact"}]]
but when I use to_yaml
on this array I get this output:
---
- - page_view
- path: somepath/asdf/asdf
name: Page View
- - outage_impact
- path: newpath/asdf/asdf
name: Outage Impact
Ideally I want something more like this:
page_view
path: somepath/af/asdf
name: blah
outage_impact
name: blah
path: adsf/adsf/asdf
I tried finding more info on the to_yaml method but it was few and far between. I think my array might need to be formatted differently but I have been guessing and checking for awhile to no avail.
Should I even be using the to_yaml method at all or would another method work better?