Method: Mixture::Types::Object.inheritable
- Defined in:
- lib/mixture/types/object.rb
.inheritable ⇒ Array<Class>
This, like Type.inheritable, provides a list of inheritable coercions; however, by default, if the requesting type isn't an Object, it also leaves out the Object type; this is so that types that are incompatible with another type all the way up to the Object don't end up getting coerced incorrectly.
22 23 24 25 26 27 28 |
# File 'lib/mixture/types/object.rb', line 22 def self.inheritable if self == Object super else ancestors - Object.ancestors end end |