Hi
I’m using data/
to store and retrieve data among multiple documents inside a MM app.
This works as supposed, I can access the data
hash from my documents.
I wrote a couple of classes that depend on the data, to make things more structured.
Classes are required in the config file.
Question: I need to access the data
hash from my classes. How can I ?
I guess it is attached to the instance of Middleman::Application, but how do I find it ?
Is there a global variable storing the data or even better the whole app ?
(in an extension, it is passed at registration time. Does that mean the answer is no ?)
For now, I pass the data hash as an argument when I call my custom class,
but this is clearly not DRY nor clean.
Thank you.
raphael.