Provider
TODO: Write a gem description
Installation
Add this line to your application's Gemfile:
gem 'provider'
And then execute:
$ bundle
Or install it yourself as:
$ gem install provider
Usage
Demo:
provide attribution
SampleOrder.first.provide("number")
#=> { "number" => "LSP11-0001" }
provide association:
SampleOrder.last.provide(["number", "customer/number"])
#=> { "number" => "LSP11-0002", "customer/number" => "LuluLemon" }
Note:
only "provide!" will raise exception when the attribution or association can't be provided.
for example:
SampleOrder.first.provide("abcdefghijk") #=> { "abcdefghijk" => nil }
SampleOrder.first.provide!("abcdefghijk") #=> this case will raise exception!
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request