| inspect | = | "DefaultBehavior Case" |
contains behavior related to the case statement
-
none
- case(value, [elseCode] nil, +[whensAndThens])
- case:and(+args)
- case:else()
- case:nand(first, +args)
- case:nor(first, +args)
- case:not(other)
- case:or(+args)
- case:otherwise()
- case:xor(first, +args)
takes one argument that should evaluate to a value, zero or more whenAndThen pairs and one optional else clause. will first evaluate the initial value, then check each whenAndThen pair against this value. if the when part of a pair returns true, then return the result of evaluating the then part. if no pair matches and no else clause is present, returns nil. if an else clause is there, it should be the last one. each whenAndThen pair is comprised of two arguments, where the first is the when argument and the second is the then argument. the when part will be evaluated and the result of this evaluation will be sent a === message with the value as argument.
nil
[ show source ]
method(first, +args, DefaultBehavior Case NAndCombiner with(first: first, components: args))
nil
[ show source ]
method(first, +args, DefaultBehavior Case NOrCombiner with(first: first, components: args))
nil
[ show source ]
method(first, +args, DefaultBehavior Case XOrCombiner with(first: first, components: args))