doc: fix: nullable 09*
This commit is contained in:
parent
81c40d6eb2
commit
250f63d8e1
1 changed files with 15 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ Variables disabled when condition is null
|
|||
|
||||
But actually, why did we want a variable to be non-mandatory?
|
||||
|
||||
Well, what we want is we need to be able to disable either the `port` and the `version` in case of the `address` has no value set:
|
||||
Well, what we want is we need to be able to :term:`disable <disabled>` either the `port` and the `version` in case of the `address` has no value set:
|
||||
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_091/firefox/20-manual.yml
|
||||
:language: yaml
|
||||
|
|
@ -179,4 +179,18 @@ Well, what we want is we need to be able to disable either the `port` and the `v
|
|||
variable: _.address
|
||||
when: null
|
||||
...
|
||||
|
||||
For the `disabled` property to trigger, the condition `when: null` must appear,
|
||||
pointing to the `_.address` variable, that is the `socks_proxy.address` variable.
|
||||
|
||||
|
||||
.. keypoints:: Key points
|
||||
|
||||
We learned how to define a variable as having no value; it's possible with Rougail.
|
||||
It's `default: null` and `mandatory: false`.
|
||||
|
||||
We also learned to continue using type redefinition, which we learned in the previous section.
|
||||
And have continued to :term:`disable <disabled>` a variable depending this on
|
||||
the presence or absence of a value.
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue