Matreska
Matreska is for building adaptable multi-filter, which is inspired by Rack.
Installation
Add this line to your application's Gemfile:
gem 'matreska'
And then execute:
$ bundle
Or install it yourself as:
$ gem install matreska
Usage
mat = Matreska.build(1)
Matreska.doll(:Plus) { |base, arg| base + arg }
Matreska.doll(:Multi) { |base, arg| base * arg }
mat.set Plus, 3
mat.set Multi, 2
mat.call #=> 8
Contributing
- Fork it ( http://github.com/
/matreska/fork ) - 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