You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, if you try to import several containers the last one overrides all the previous ones.
But instead, we should make it work according to the following specification
Importing a container
We need to add a mechanism to store the imported containers in a box with assigned labels.
The first imported container gets the label main. Basically, the target class or a module should have a storage, like a hash, with labels as keys and with containers as values.
For example:
classServiceincludeA.import# this line should store { main: A }defcallf('math.value')# => should workf('main.math.value')# should also workendend
If one container is imported
The behavior stays the same
** If several containers are imported
An attempt to import a second module without an explicit alias should raise an error
classServiceincludeA.import# this line should store { main: A }includeB.import# this line should failincludeB.import.as(:second)# ok will workend
The function f should look through the containers from top to bottom if there is no top namespace provided.
The text was updated successfully, but these errors were encountered:
Currently, if we try to do something like this:
Basically, if you try to import several containers the last one overrides all the previous ones.
But instead, we should make it work according to the following specification
Importing a container
We need to add a mechanism to store the imported containers in a box with assigned labels.
The first imported container gets the label
main
. Basically, the target class or a module should have a storage, like a hash, with labels as keys and with containers as values.For example:
If one container is imported
** If several containers are imported
f
should look through the containers from top to bottom if there is no top namespace provided.The text was updated successfully, but these errors were encountered: