WFlow
WFlow aims to help on designing workflows based on Single Responsibility Principle. WFlow proposes to achieve this by providing tools to build classes where each are responsible for a task and one task only, and by providing tools to compose these classes.
Word of appreciation for usecasing, interactor and rest_my_case that served as inspiration for this gem.
Dependencies
Tested with:
- ruby 2.2.1, 2.2.0, 2.1.1, 2.0.0
Installation
Add this line to your application's Gemfile:
gem 'w_flow'
And then execute:
$ bundle
Or install it yourself as:
$ gem install w_flow
Usage
On its most simplest form a task (in WFlow called a Process) is something like this:
class SaveUser
include WFlow::Process
def perform
# arguments passed to run will be under flow.data
flow.data.user.save
end
end
# run process, it will return a report object
report = SaveUser.run(user: current_user)
report.data.success?
Contributing
- Fork it ( https://github.com/junhanamaki/w_flow/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 a new Pull Request

