Closed rewritten closed 2 years ago
This should close #19
With this change, the ancestors of a subclass of a service are:
puts my_service_instance.class.ancestors # SubClass::InjectableCallFacade # SubClass # Injectable::InstanceMethods # SuperClass::InjectableCallFacade # SuperClass # Injectable # Object # Kernel # BasicObject
Each concrete class over Injectable gets a dynamically generated module, with a :call implementation that
:call
This way we have an alternating chain of methods (one in the facade and one in the concrete class) that call each other.
The dynamically generated module does not need to be assigned to a constant, but it helps when reading traces.
Code Climate has analyzed commit a7ae61e0 and detected 12 issues on this pull request.
Here's the issue category breakdown:
View more on Code Climate.
This should close #19
With this change, the ancestors of a subclass of a service are:
Each concrete class over Injectable gets a dynamically generated module, with a
:call
implementation thatThis way we have an alternating chain of methods (one in the facade and one in the concrete class) that call each other.
The dynamically generated module does not need to be assigned to a constant, but it helps when reading traces.