class Ven::Suite::MGenericFunction

Overview

An abstract callable entity that supervises a list of concrete implementations (aka variants) (see MConcreteFunction).

Defined in:

ven/suite/model.cr

Constructors

Instance Method Summary

Instance methods inherited from class Ven::Suite::MFunction

callable? callable?

Instance methods inherited from class Ven::Suite::MClass

callable? : Bool callable?, eqv?(other : Model) : Bool eqv?, field(name : String) : Model | Nil field, is_bool_false? : Bool is_bool_false?, of?(other : MType) : Bool
of?(other)
of?
, to_bool(inverse = false) : MBool to_bool, to_num : Num to_num, to_str : Str to_str, to_vec : Vec to_vec, true? : Bool true?, truth=(truth : Bool) truth=, truth? truth?

Constructor Detail

def self.new(name : String) #

[View source]

Instance Method Detail

def add(variant : MConcreteFunction) #

Adds variant to the list of variants this generic supervises. Overrides an existing variant with the same signature as the variant, if found one. Returns the variant back.


[View source]
def field(name) #

[View source]
def name : String #

[View source]
def to_s(io) #

[View source]
def variants : Array(Ven::Suite::MConcreteFunction) #

The concretes supervised by this generic.


[View source]