README.md in refinements-0.1.0 vs README.md in refinements-1.0.0
- old
+ new
@@ -1,22 +1,71 @@
-# Overview
+<!-- START doctoc generated TOC please keep comment here to allow auto update -->
+<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
+# Table of Contents
-[![Gem Version](https://badge.fury.io/rb/refinements.png)](http://badge.fury.io/rb/refinements)
-[![Code Climate GPA](https://codeclimate.com/github/bkuhlmann/refinements.png)](https://codeclimate.com/github/bkuhlmann/refinements)
-[![Code Climate Coverage](https://codeclimate.com/github/bkuhlmann/refinements/coverage.png)](https://codeclimate.com/github/bkuhlmann/refinements)
-[![Gemnasium Status](https://gemnasium.com/bkuhlmann/refinements.png)](https://gemnasium.com/bkuhlmann/refinements)
-[![Travis CI Status](https://secure.travis-ci.org/bkuhlmann/refinements.png)](http://travis-ci.org/bkuhlmann/refinements)
+- [Refinements](#refinements)
+- [Table of Contents](#table-of-contents)
+- [Features](#features)
+- [Requirements](#requirements)
+- [Setup](#setup)
+- [Usage](#usage)
+ - [Requires](#requires)
+ - [Using](#using)
+ - [Examples](#examples)
+ - [Array](#array)
+ - [Big Decimal](#big-decimal)
+- [Tests](#tests)
+- [Versioning](#versioning)
+- [Code of Conduct](#code-of-conduct)
+- [Contributions](#contributions)
+- [License](#license)
+- [History](#history)
+- [Credits](#credits)
-Provides a collection of refinements to the standard Ruby objects.
+<!-- END doctoc generated TOC please keep comment here to allow auto update -->
+# Refinements
+
+[![Gem Version](https://badge.fury.io/rb/refinements.svg)](http://badge.fury.io/rb/refinements)
+[![Code Climate GPA](https://codeclimate.com/github/bkuhlmann/refinements.svg)](https://codeclimate.com/github/bkuhlmann/refinements)
+[![Code Climate Coverage](https://codeclimate.com/github/bkuhlmann/refinements/coverage.svg)](https://codeclimate.com/github/bkuhlmann/refinements)
+[![Gemnasium Status](https://gemnasium.com/bkuhlmann/refinements.svg)](https://gemnasium.com/bkuhlmann/refinements)
+[![Travis CI Status](https://secure.travis-ci.org/bkuhlmann/refinements.svg)](http://travis-ci.org/bkuhlmann/refinements)
+[![Patreon](https://img.shields.io/badge/patreon-donate-brightgreen.svg)](https://www.patreon.com/bkuhlmann)
+
+Provides a collection of refinements for core Ruby objects.
+
+<!-- Tocer[start]: Auto-generated, don't remove. -->
+
+# Table of Contents
+
+- [Features](#features)
+- [Requirements](#requirements)
+- [Setup](#setup)
+- [Usage](#usage)
+ - [Requires](#requires)
+ - [Using](#using)
+ - [Examples](#examples)
+ - [Array](#array)
+ - [Big Decimal](#big-decimal)
+- [Tests](#tests)
+- [Versioning](#versioning)
+- [Code of Conduct](#code-of-conduct)
+- [Contributions](#contributions)
+- [License](#license)
+- [History](#history)
+- [Credits](#credits)
+
+<!-- Tocer[finish]: Auto-generated, don't remove. -->
+
# Features
-- Adds the following Array refinements:
- - Array#compress - Removes nil and empty values without modifying original values.
- - Array#compress! - Removes nil and empty values and modifies original values.
-- Adds the following BigDecimal refinements:
- - BigDecimal#inspect - Allows one to inspect a big decimal with numeric representation.
+- Adds Array refinements:
+ - `Array#compress` - Removes nil and empty values without modifying original values.
+ - `Array#compress!` - Removes nil and empty values and modifies original values.
+- Adds BigDecimal refinements:
+ - `BigDecimal#inspect` - Allows one to inspect a big decimal with numeric representation.
# Requirements
0. [MRI 2.x.x](http://www.ruby-lang.org).
@@ -32,35 +81,59 @@
For an insecure install, type the following (not recommended):
gem install refinements
+Add the following to your Gemfile file:
+
+ gem "refinements"
+
# Usage
-## Array
+## Requires
- using Refinements::ArrayExtensions
+Due to this gem being a collection of Ruby refinements, none of the refinements are auto-loaded by default in order to
+reduce code bloat for your app. Instead, require the specific requirement for the code that needs it. You'll want to
+require one or all of the following:
+ require "refinements/array_extensions"
+ require "refinements/big_decimal_extensions"
+
+## Using
+
+In addition to requiring the appropriate refinement file for the code that needs it, you'll also need to use the
+refinement by using the `using` keyword within your object. You'll want to use one or all of the following:
+
+ class Example
+ using Refinements::ArrayExtensions
+ using Refinements::BigDecimalExtensions
+ end
+
+## Examples
+
+With the appropriate refinements required and used within your objects, the following sections demonstrates how each
+refinement enriches your objects with new capabilities.
+
+### Array
+
example = ["An", nil, "", "Example"]
example.compress # => ["An", "Example"]
example # => ["An", nil, "", "Example"]
example = ["An", nil, "", "Example"]
example.compress! # => ["An", "Example"]
example # => ["An", "Example"]
-## Big Decimal
+### Big Decimal
- using Refinements::BigDecimalExtensions
-
big = BigDecimal.new "5.0E-10"
big.inspect # => "#<BigDecimal:3fd3d458fe84 0.0000000005>"
# Tests
To test, run:
- bundle exec rspec spec
+ bundle exec rake
# Versioning
Read [Semantic Versioning](http://semver.org) for details. Briefly, it means: