class FeatureToggles::Loader
Public Class Methods
new(env)
click to toggle source
# File lib/feature_toggles/loader.rb, line 3 def initialize(env) @env = env end
Public Instance Methods
load(file_name)
click to toggle source
# File lib/feature_toggles/loader.rb, line 7 def load(file_name) @feature_toggle_data ||= begin file_path = Rails.root.join("config", file_name) toggle_settings = HashWithIndifferentAccess.new(YAML::load(File.open(file_path))) toggle_settings[@env] end end