.= multimethod
Methods
- .=(obj:NormalType, field:Str, v:Any)
Set NormalType (a type that is typically defined by user) field. Throws FieldNotFound. Automatically called by NGS for syntax
obj.field = v
Parameters
field Field to set. Currently only "user" is supported. Returns
Str for "name" and Arr for "constructors".
- .=(obj:NormalTypeInstance, field:Str, v:Any)
Set Normal type (a type that is typically defined by user) instance field Automatically called by NGS for syntax
obj.field = v
Returns
AnyExample
type T; t=T(); t.x=1
- .=(hl:HashLike, k:Any, v:Any) Source: stdlib.ngs:707
Set value. Automatically called by NGS for syntax
your_hashlike.literal_key = v
Returns
v
- .=(h:Hash, field:Str, v:Any) Source: stdlib.ngs:1416
Set hash key. Returns
vExample
h = {"a": 1} h.a = 2 # 2, Same as h["a"] = 2
- .=(a:Arr, field:Str, v:Any) Source: stdlib.ngs:1458
Set field of every element in array to v Returns
vExample
a=[{"x": 1}, {"x": 2}] a.y = 10 # a == [{"x": 1, "y": 10}, {"x": 2, "y": 10}]
- .=(p:Process, field:Str, v:Any) Source: stdlib.ngs:4471
Set process "stdout" Parameters
field "stdout" Returns
Unspecified, do not count on this value
- .=(p:Process, field:Str, v:Any) Source: stdlib.ngs:4487
Set process "stderr" Parameters
field "stderr" Returns
Unspecified, do not count on this value