README.md in processable-0.0.2 vs README.md in processable-1.0.0

- old
+ new

@@ -11,12 +11,12 @@ step :get_only_essential_fields do |repos_json| repos_json.except(:title, :description) end - step :print_to_console do |repos_json| - print repos_json + step :print_to_console do |result_from_prev_step, current_step, list_of_steps| + print result_from_prev_step end end PrintGithubRepos.new.process ``` @@ -28,17 +28,18 @@ ```ruby gem 'processable' ``` And then execute: +```shell +bundle install +``` - $ bundle install - Or install it yourself as: - - $ gem install processable - +```shell +gem install processable +``` ## Usage **Define new class with required behavior** ```ruby @@ -69,9 +70,22 @@ To start the process simply call... ```ruby SiteScrapper.new.process ``` + +To run the process until some certain step you can pass the name of the step as an argument. Also keep in mind the step defined in run_until will not be executed as well. + +```ruby +SiteScrapper.new.process(run_until: :save_to_database) +``` + +To exec only one particular step you can pass the name of the step as an argument. + +```ruby +SiteScrapper.new.process(exec_step: :save_to_database) +``` + ## 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.