Closed zintus closed 11 years ago
That would be the behavior, yes. Internally, modules use a provider to bind a protocol to a class. There is a todo to "Pass along arguments to providers" which is notated in the README.
Thank you for comment! "Pass along arguments to providers" was a little bit cryptic for me :)
It certainly isn't obvious. :-) I will see if i can't address this problem in the next week.
1) Create class with objection_initializer specifying selector and default argument. 2) Bind class to protocol in module spec. 3) Get instance of protocol binded on step 2 from injector with getObjectWithArgs overriding default argument from step 1.
Expected result: object binded to protocol initialized with argument passed on step 3.
Actual result: object initialized with argument specified on step 1 with no respect to values passed on step 3.