How does dependency inversion principle work in languages without interfaces?
https://softwareengineering.stackexchange.com/questions/195176
-
06-11-2019 - |
Question
In C#/Java, the dependency inversion principle is often demonstrated by high-level classes that depends on an interface/abstraction (that it owns). Low-level classes will implement the interface, thus inverting the dependency.
I wonder, how is it applied in object-oriented languages with no interface? For example, I'm not an expert in Ruby, but it seems that in this language you can't define interfaces like in Java/.NET
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with softwareengineering.stackexchange