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_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_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.
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.