Top Level Namespace

Defined in:

Macro Summary

Macro Detail

macro defined?(const) #

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.


[View source]
macro if_defined?(const, &code) #

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.


[View source]
macro if_version?(const, comparison, value, &code) #

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.


[View source]
macro unless_defined?(const, &code) #

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.


[View source]
macro unless_version?(const, comparison, value, &code) #

[View source]