Module: Middleman::Features::ClassMethods

Defined in:
lib/middleman/features.rb

Instance Method Summary collapse

Instance Method Details

#activate(feature_name) ⇒ Object



24
25
26
27
28
29
# File 'lib/middleman/features.rb', line 24

def activate(feature_name)
  mod_name = feature_name.to_s.camelize
  if Middleman::Features.const_defined?(mod_name)
    register Middleman::Features.const_get(mod_name)
  end
end

#enable(feature_name) ⇒ Object



31
32
33
34
35
# File 'lib/middleman/features.rb', line 31

def enable(feature_name)
  $stderr.puts "Warning: Feature activation has been renamed from enable to activate"
  activate(feature_name)
  super(feature_name)
end