Sha256: 72bcc02b4c58a530e5ea01a7bb4bab347848a948b79284222625d47c8f07bb28
Contents?: true
Size: 1.06 KB
Versions: 6
Compression:
Stored size: 1.06 KB
Contents
class Object raise 'Abstract feature branch conflicts with another Ruby library' if respond_to?(:feature_branch) def self.feature_branch(feature_name, branches = {}, &feature_work) branches[:true] ||= feature_work branches[:false] ||= lambda {} feature_branch_symbol_value = (!!feature_enabled?(feature_name)).to_s.to_sym branches[feature_branch_symbol_value].call end raise 'Abstract feature branch conflicts with another Ruby library' if respond_to?(:feature_enabled?) def self.feature_enabled?(feature_name) AbstractFeatureBranch.environment_features(Rails.env.to_s)[feature_name.to_s] end raise 'Abstract feature branch conflicts with another Ruby library' if Object.new.respond_to?(:feature_branch) def feature_branch(feature_name, branches = {}, &feature_work) Object.feature_branch(feature_name.to_s, branches, &feature_work) end raise 'Abstract feature branch conflicts with another Ruby library' if Object.new.respond_to?(:feature_enabled?) def feature_enabled?(feature_name) Object.feature_enabled?(feature_name.to_s) end end
Version data entries
6 entries across 6 versions & 1 rubygems