Sha256: f565079e2d96156e373e9952cb03c3010836630d11c7541369a63d636323b729
Contents?: true
Size: 755 Bytes
Versions: 3
Compression:
Stored size: 755 Bytes
Contents
module Archetype::SassExtensions::Util::Debug # # check if debug is enabled # # *Parameters*: # - <tt>$iff</tt> {Boolean} optional override for `$CONFIG_DEBUG` # *Returns*: # - {Boolean} whether or not debug is enabled # def is_debug_enabled(iff = nil) # debug is only available in DEBUG environments, so check that first return bool(false) unless (environment.var('CONFIG_DEBUG_ENVS') || []).to_a.include?(archetype_env) # then check if the debug flag/override is truthy # if the param is non-null, then use it return iff unless helpers.is_null(iff) # otherwise, use `CONFIG_DEBUG` return environment.var('CONFIG_DEBUG') || bool(false) end Sass::Script::Functions.declare :is_debug_enabled, [:iff] end
Version data entries
3 entries across 3 versions & 1 rubygems