I\'m currently trying to learn Ruby and I\'m trying to understand more about what it offers in terms of encapsulation and contracts.
In C# a contract can be defined
Interfaces are usually introduced to static typed OO languages in order to make up for lack of multiple inheritance. In other words, they are more of a necessary evil than something useful per se.
Ruby, on the other hand:
foo
on two objects, they don't need to neither inherit same ancestor class, nor implement the same interface.