Assign variable value to a block in jade

Is it possible to assign the value of a variable to a block? Either it is not possible or I'm doing it wrong.

Example:

- var $foo = "bar"

block #{$foo}
    div.a_class Some content

This is not possible because blocks are compile-time, not runtime.