@bobbybouwmann glad you like it! There are still a few edge cases I’m currently trying to decide with myself how to solve. For example, what if your actual model has a method called
`now? Right now, Factor won’t delegate to the model instance when these two methods are invoked since they are defined on the proxy object.
One way I thought about tackling it is to use some logical guard on the ‘states()
)` and thnow()` methods to check to see if a model has already been generated. If it has, we delegate to the model instance if it has those methods defined. If they do not exist, use the proxy object’s methods.
However, that begs the question, what if the user has a
now() method on his model and he simply wants to invoke it. By calling
now() on the proxy object, given we haven’t built the model yet, will simply build the model and won’t invoke the model’s
’s method. Maybe what we can do is to build the model and check to see if a
if amethod exists on that model. If so, we also invoke that method. But again, what happens if there is a
is a method on the model but we do not want to invoke it?
What do you think?