Why an Adapter?
Learn how to use an adapter and learn its advantages.
We'll cover the following...
Adapter advantages
Using an adapter class to mediate interaction with the external service is a good idea even when, like Twitter, the external service already has a Ruby gem. The adapter encapsulates logic that is specific to the interaction between our application and the service.
An adapter is useful if our code has any or all of the following qualities: