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.crConstructors
Instance Method Summary
-
#add(variant : MConcreteFunction)
Adds variant to the list of variants this generic supervises.
- #field(name)
- #name : String
- #to_s(io)
-
#variants : Array(Ven::Suite::MConcreteFunction)
The concretes supervised by this generic.
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) : Boolof?(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
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.