class Ven::Suite::MBoxInstance
- Ven::Suite::MBoxInstance
- Ven::Suite::MClass
- Reference
- Object
Overview
An instance of an MBox
.
Carries with it its own copy of Scope (Context::Machine::Scope
),
which was created at instantiation, and allows to access
the entries of that scope through field access.
Defined in:
ven/suite/model.crConstructors
Instance Method Summary
-
#[]=(referent : Str, value : Model)
Sets referent field of this box instance to value.
-
#eqv?(other : MBoxInstance)
Returns whether this box instance is equal to the other box instance.
-
#eqv?(other : MBox)
Returns whether this box instance is parented by the other box.
-
#field(name)
Returns one of the fields in the namespace of this box instance.
- #namespace : Context::Machine::Scope
- #parent : MFunction
- #to_s(io)
Instance methods inherited from class Ven::Suite::MClass
[]=(referent : Model, value : Model) : Model | Nil
[]=,
[]?(index : Int)[]?(index : Range) []?, callable? : Bool callable?, eqv?(other : Model) : Bool eqv?, false? : Bool false?, field(name : String) : Model | Nil field, indexable? indexable?, length : Int32 length, match(other : Model) match, nth(index : Num)
nth(range : MRange)
nth(other) nth, of?(other : MType) : Bool
of?(other : MAny)
of?(other) of?, set_referent(referent : Model, value : Model) : Model set_referent, 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?, weight : MWeight weight
Constructor Detail
Instance Method Detail
Sets referent field of this box instance to value.
If referent is one of the typed fields (i.e., it was declared as a box parameter and thus has a type), a match against that type is performed.
Returns whether this box instance is equal to the other box instance.
This box instance and other box instance are equal if and only if their hashes are equal.
Returns whether this box instance is parented by the other box.