README.md in usable-1.2.1 vs README.md in usable-1.3.0

- old
+ new

@@ -1,8 +1,8 @@ # Usable [![Gem Version](https://badge.fury.io/rb/usable.svg)](http://badge.fury.io/rb/usable) [![Build Status](https://travis-ci.org/ridiculous/usable.svg)](https://travis-ci.org/ridiculous/usable) [![Code Climate](https://codeclimate.com/github/ridiculous/usable/badges/gpa.svg)](https://codeclimate.com/github/ridiculous/usable) -A simple way to mount and configure your modules. Usable gives you control over which methods are included, and a simple +An elegant way to mount and configure your modules. Usable gives you control over which methods are included, and a simple interface to help you call dynamic methods with confidence. ```ruby module VersionMixin def save_version @@ -29,10 +29,24 @@ model = Model.new model.save_version # => "Saving up to 10 versions to custom_versions" model.destroy_version # => NoMethodError: undefined method `destroy_version' for #<Model:... ``` -`Model` now has a `#save_versions` method but no `#destroy_version` method. +`Model` now has a `#save_versions` method but no `#destroy_version` method. Usable has effectively mixed in the given module +using `include`. Ruby 2+ offers the `prepend` method, which can be used instead by specifying it as the `:method` option: + +```ruby +Model.usable VersionMixin, method: :prepend +``` + +Usable reserves the `:only` and `:method` keys. All other keys in the given hash are defined as config settings. +If you really want to define a config on the target class with one of these names, you can simply define them in the block: + +```ruby +Model.usable VersionMixin, only: [:save_version] do |config| + config.only = "Will be set on `Model.usable_config.only`" +end +``` ## Confidently calling methods We should all be writing [confident code](http://www.confidentruby.com/), which is why you might want to call configurable methods through the `usable_method` class level function. Methods passed in with the `:only` option