Sha256: cd8cccfa974d3d576c08c968f6b9d645dfffb654b7b3fae84683a54c1e9a6d72
Contents?: true
Size: 730 Bytes
Versions: 30
Compression:
Stored size: 730 Bytes
Contents
require 'pugin/feature/simple_feature' require 'pugin/feature/status_banner' require 'pugin/feature/global_search' require 'pugin/feature/top_navigation' 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
30 entries across 30 versions & 1 rubygems