module FlipFlop::Adapters::YAML
Constants
- DEFAULT_YAML_PATH
Public Instance Methods
after_initialize()
click to toggle source
# File lib/flip-flop/adapters/yaml.rb, line 10 def after_initialize @features = load_yaml end
load_yaml()
click to toggle source
# File lib/flip-flop/adapters/yaml.rb, line 18 def load_yaml ::YAML.load_file(yaml_path) || {} end
write_yaml()
click to toggle source
# File lib/flip-flop/adapters/yaml.rb, line 22 def write_yaml File.open(yaml_path, 'w') { |f| f.write @features.to_yaml } end
yaml_path()
click to toggle source
# File lib/flip-flop/adapters/yaml.rb, line 14 def yaml_path @config[:yaml_path] || DEFAULT_YAML_PATH end