Module: Nanoc::Feature Private

Defined in:
lib/nanoc/base/feature.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Constant Summary collapse

TRUES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

%w(y yes 1 t true).freeze

Class Method Summary collapse

Class Method Details

.enabled?(name) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


6
7
8
9
# File 'lib/nanoc/base/feature.rb', line 6

def self.enabled?(name)
  env_name = "NANOC_FEATURE_#{name.upcase}"
  TRUES.include?(ENV.fetch(env_name, 'f').downcase)
end