Class | Lisp::Format::Directives::BeginConditional |
In: |
lib/facet/lisp-format.rb
|
Parent: | Directive |
Represents the ~[ (Begin conditional expression) directive. This is useful to choose among a set of directives depending on arguments and numbers.
Connect a set of directives to this conditional directive. A SyntaxError is raised if multiple clauses have been marked as ‘default’, or if too many clauses have been specified for a given set of modifiers.
Process one of the given clauses, depending on the numeric value of the given argument, or a specified parameter. The full form is
~n[clause0~;clause1~:;clause2~]
or
~:[clause0~;clause1~]
or
~@[clause0~]
with the following interpretations