README.md in to_collection-1.0.0 vs README.md in to_collection-1.0.1

- old
+ new

@@ -1,6 +1,6 @@ -# `to_collection` v1.0.0 +# `to_collection` [![Gem Version](https://badge.fury.io/rb/to_collection.svg)](http://badge.fury.io/rb/to_collection) [![Build Status](https://travis-ci.org/AndyObtiva/to_collection.svg?branch=master)](https://travis-ci.org/AndyObtiva/to_collection) [![Coverage Status](https://coveralls.io/repos/github/AndyObtiva/to_collection/badge.svg?branch=master)](https://coveralls.io/github/AndyObtiva/to_collection?branch=master) Treat an array of objects and a singular object uniformly as a collection of objects. @@ -35,10 +35,24 @@ city_counts[person["city"]] += 1 end end ``` +## Instructions + +### Bundler / Rails + +`gem 'to_collection', '~> 1.0.1'` + +### Plain Ruby + +`require 'to_collection'` + +### Note + +Code above enables `#to_collection` method on all classes inheriting from `Object`. See [options](#options) below in case you prefer to **manually** include in certain classes only. + ## Background I'm sure you've encountered REST Web Service APIs that operate as follows: HTTP Request: => @@ -274,11 +288,11 @@ Example: Bundler would have gem require option as false: ```ruby -require 'to_collection', require: false +gem 'to_collection', require: false ``` Ruby code would then set that environment variable **manually** before requiring library: ```ruby @@ -293,9 +307,15 @@ response_data = people_http_request #returns single hash or array of hashes response_data.to_collection.each do |person_hash| # do some work end ``` + +## Release Notes + +### v1.0.1 + +- Updated `super_module` gem version to relax indirect `method_source` gem version dependency ## Contributing * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet. * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.