Top Level Namespace
Defined in:
Macro Summary
-
defined?(const)
This macro accepts a string or a symbol of a fully qualified constant name.
-
if_defined?(const, &code)
This macro accepts a string or a symbol of a fully qualified constant name.
-
if_disabled?(env_var, &block)
Instantiate the code that is passed in the block only if the
env_varenvironment is not set. -
if_enabled?(env_var, &block)
Instantiate the code that is passed in the block only if the
env_varenvironment variable is set. -
if_version?(const, comparison, value, &code)
This macro accepts a string or a symbol of a fully qualified constant name.
-
unless_defined?(const, &code)
This macro accepts a string or a symbol of a fully qualified constant name.
-
unless_disabled?(env_var, &block)
Instantiate the code that is passed in the block only if the
env_varenvironment variable is set. -
unless_enabled?(env_var, &block)
Instantiate the code that is passed in the block only if the
env_varenvironment variable is not set. - unless_version?(const, comparison, value, &code)
Macro Detail
This macro accepts a string or a symbol of a fully qualified constant name.
It validates whether the constant is defined, starting at the top level. The value
of the constant will be returned if it is defined. If it is not defined, false is
returned.
This macro accepts a string or a symbol of a fully qualified constant name. It validates whether the constant is defined, starting at the top level. If the constant is defined, the code passed to the macro via a block will be instantiated. This permits conditional code evaluation based on whether a constant is defined.
Instantiate the code that is passed in the block only if the env_var environment
is not set.
Instantiate the code that is passed in the block only if the env_var environment
variable is set.
This macro accepts a string or a symbol of a fully qualified constant name.
This constant will be checked for a VERSION or a Version constant, or a
#version method under it. If it exists, the value held by that constant, or
returned by the #version method is compared with the provided comparison operator
to the value, using a SemanticVersion comparison.
This macro accepts a string or a symbol of a fully qualified constant name. It validates whether the constant is defined, starting at the top level. If the constant is not defined, the code passed to the macro via a block will be instantiated. This permits conditional code evaluation based on whether a constant is defined.
Instantiate the code that is passed in the block only if the env_var environment
variable is set.
Instantiate the code that is passed in the block only if the env_var environment
variable is not set.