Shopify/identity_cache — pull request #130 by dylanahsmith (2014-03-04 22:22:29+00:00)
Title: Make some undocumented methods private.

@arthurnn & @fbogsany for review

## Problem

Currently, we are calling `private_class_method` and `private` with a list of methods to make private, which makes it easy to miss marking methods private that should be. E.g. IdentityCache::ConfigurationDSL::ClassMethods#attribute_dynamic_fetcher should probably have been marked private and was commented with `#:nodoc:`, but was missed from the private_class_method list.

I also found there were methods that might have been left public to make them easy to call within tests or external to the object in identity_cache.

## Solution

This uses `private` without arguments to make everything after it private. We were already structuring the code such that the private methods were always last in the classes.

In cases where we need to call an internal methods from another object, I just used `.send(:` instead. I also had to change some `respond_to?` calls to pass a second argument of `true` to have it also check for private methods.

I think this makes it easier to see what methods are private when reading the code.