Skip to content

Instantly share code, notes, and snippets.

@Sauraus
Created July 18, 2013 00:15
Show Gist options
  • Save Sauraus/6025735 to your computer and use it in GitHub Desktop.
Save Sauraus/6025735 to your computer and use it in GitHub Desktop.
if provider
# Verify that the given provider matches what the box has.
if box_provider.to_sym != provider
@logger.error("Added box provider doesnt match expected: #{box_provider}")
raise Errors::BoxProviderDoesntMatch, :expected => provider, :actual => box_provider
end
else
# We weren't given a provider, so store this one.
provider = box_provider.to_sym
# Verify the box doesn't already exist
check_box_exists.call(provider)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment