Sha256: 5d44105003b5b620524a9fc1161aa3680b9857edbbc41daf105bb07a9021cfb9
Contents?: true
Size: 691 Bytes
Versions: 15
Compression:
Stored size: 691 Bytes
Contents
require 'pugin/feature/simple_feature' require 'pugin/feature/status_banner' require 'pugin/feature/global_search' require 'pugin/feature/pingdom_feature' require 'pugin/feature/asset_overrides' require 'pugin/feature/bandiera' module Pugin module Feature def self.enable(feature) get_feature(feature)&.enable end def self.disable(feature) get_feature(feature)&.disable end private def self.get_feature(feature) # Does the feature passed exist? raise ArgumentError, "Feature #{feature} does not exist in Pugin. Please check your spelling and try again." unless constants.include?(feature.to_sym) Object.const_get("Pugin::Feature::#{feature}") end end end
Version data entries
15 entries across 15 versions & 1 rubygems