README.md in the_help-1.5.2 vs README.md in the_help-1.6.1

- old
+ new

@@ -38,32 +38,30 @@ authorization_policy allow_all: true main do call_service(GetSomeWidgets, customer_id: 12345, - each_widget: method(:process_widget), - invalid_customer: method(:no_customer), - no_widgets_found: method(:no_widgets)) + each_widget: callback(:process_widget), + invalid_customer: callback(:no_customer), + no_widgets_found: callback(:no_widgets)) do_something_else end - private - - def process_widget(widget) + callback(:process_widget) do |widget| # do something with it end - def invalid_customer + callback(:invalid_customer) do # handle this case stop! end - def no_widgets + callback(:no_widgets) do # handle this case end - def do_something_else + callback(:do_something_else) do # ... end end ``` @@ -139,23 +137,35 @@ throw a symbol other than `:stop`; but do so with caution, since it may have unintended consequences further down the stack.) ## Development -After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. +After checking out the repo, run `bin/setup` to install dependencies. Then, run +`rake spec` to run the tests. You can also run `bin/console` for an interactive +prompt that will allow you to experiment. -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). +To install this gem onto your local machine, run `bundle exec rake install`. To +release a new version, update the version number in `version.rb`, and then run +`bundle exec rake release`, which will create a git tag for the version, push +git commits and tags, and push the `.gem` file to +[rubygems.org](https://rubygems.org). ## Contributing -Bug reports and pull requests are welcome on GitHub at https://github.com/jwilger/the_help. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. +Bug reports and pull requests are welcome on GitHub at +https://github.com/jwilger/the_help. This project is intended to be a safe, +welcoming space for collaboration, and contributors are expected to adhere to +the [Contributor Covenant](http://contributor-covenant.org) code of conduct. ## License -The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). +The gem is available as open source under the terms of the [MIT +License](https://opensource.org/licenses/MIT). ## Code of Conduct -Everyone interacting in the TheHelp project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/jwilger/the_help/blob/master/CODE_OF_CONDUCT.md). +Everyone interacting in the TheHelp project’s codebases, issue trackers, chat +rooms and mailing lists is expected to follow the [code of +conduct](https://github.com/jwilger/the_help/blob/master/CODE_OF_CONDUCT.md). [SRP]: https://en.wikipedia.org/wiki/Single_responsibility_principle [TDA]: https://martinfowler.com/bliki/TellDontAsk.html