Results 1 to 4 of 4
Thread: Interfaces and Type Hinting?
Jun 29, 2009, 23:22 #1
- Join Date
- Sep 2004
- 0 Post(s)
- 0 Thread(s)
Interfaces and Type Hinting?
I'm just starting out with Ruby and I've got a question about the OO features of the language.
Does Ruby support native interfaces, or do you need to code your own base or mixin setup?
And if you do manage to create a interface then is it possible to setup a type hint within a the parameters of a function to only allow a specific type of Class or Interface to be accepted?
sub someFunc(Class a)
Is this possible?I can't believe I ate the whole thing