module Pugin::Feature
Public Class Methods
disable(feature)
click to toggle source
# File lib/pugin/feature.rb, line 14 def self.disable(feature) get_feature(feature)&.disable end
enable(feature)
click to toggle source
# File lib/pugin/feature.rb, line 10 def self.enable(feature) get_feature(feature)&.enable end
Private Class Methods
get_feature(feature)
click to toggle source
# File lib/pugin/feature.rb, line 20 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