3 ways to configure your Ruby API wrappers

When you use Ruby to wrap an API, you have to have a way to configure it. Maybe the wrapper needs a username and secret key, or maybe just a host.

There are a few different ways to handle this. So which one should you choose?

The easy, global way

You might want your service to act like it’s always around. No matter where you are in your app, you’d have it ready to use. Otherwise, you’ll spend three lines of configuring it for every line of using it!

You could make the configuration global, us...

 •  0 comments  •  flag
Share on Twitter
Published on June 02, 2015 09:36
No comments have been added yet.