class Mixture::Types::Object

An object. This adds the basic constraints all types (that inherit from Object) have; i.e., it must be an object, and it must be the type's primitive.

Public Class Methods

inheritable() click to toggle source

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.

@return [Array<Class>]

Calls superclass method
# File lib/mixture/types/object.rb, line 22
def self.inheritable
  if self == Object
    super
  else
    ancestors - Object.ancestors
  end
end