Skip to content

Instantly share code, notes, and snippets.

@bilus
Created February 4, 2013 18:46
Show Gist options
  • Save bilus/4708662 to your computer and use it in GitHub Desktop.
Save bilus/4708662 to your computer and use it in GitHub Desktop.
def normalized_experiments
if @experiments.nil?
nil
else
experiment_config = {}
@experiments.keys.each do | name |
experiment_config[name] = {}
end
@experiments.each do | experiment_name, settings|
experiment_config[experiment_name][:alternatives] = normalize_alternatives(settings[:alternatives]) if settings[:alternatives]
end
experiment_config
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment