lib/feature_gate.rb in feature_gate-0.0.7 vs lib/feature_gate.rb in feature_gate-0.0.8

- old
+ new

@@ -7,32 +7,8 @@ # Yield self on setup for nice config blocks def self.setup yield self end - - def self.gate_page(name) - gated_feature = GatedFeature.where(name: name).first_or_create - if gated_feature.gated? - raise ActiveRecord::RecordNotFound - end - end - - def self.gate(name) - gated_feature = GatedFeature.where(name: name).first_or_create - if !gated_feature.gated? - yield - end - end - - def self.open!(name) - gated_feature = GatedFeature.find_by_name!(name) - gated_feature.deploy_feature! - end - - def self.close!(name) - gated_feature = GatedFeature.find_by_name!(name) - gated_feature.gate_feature! - end end require 'feature_gate/engine'