<img src=“https://travis-ci.org/WildDima/pipeline_ruby.svg?branch=master” alt=“Build Status” />
Simple pipeline operator for ruby
Add this line to your application’s Gemfile:
gem 'pipeline_ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pipeline_ruby
class Test include Pipeline def upcase(arg) arg.upcase end def split(arg) arg.split end def reverse(arg) arg.reverse end def join(arg) arg.join end def call(arg) # Instead of this: # join( # reverse( # split( # upcase(arg) # ) # ) # ) # We can use it like this: pipeline(arg) do upcase >> split >> reverse >> join end end end
Bug reports and pull requests are welcome on GitHub at github.com/wild_dima/pipeline_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
The gem is available as open source under the terms of the [MIT License](opensource.org/licenses/MIT).