geekq / workflow

Ruby finite-state-machine-inspired API for modeling workflow
MIT License
1.75k stars 207 forks source link

Inaccurate Readme: Symbols Not Accepted in 1.2.0 #145

Closed posgarou closed 9 years ago

posgarou commented 9 years ago

The Readme states and gives several examples of using symbols in if: conditions (e.g., if: :sufficient_battery?).

However, while the code for this exists in the current event.rb, it does not exist in the relevant code for v. 1.2.0, where the same section reads:

@condition = if condition.nil? || condition.respond_to?(:call)
                     condition
                   else
                     raise TypeError, 'condition must be nil or callable (eg. a proc or lambda)'
                   end

The Readme should either be adjusted or a new version should be released with this feature.

geekq commented 9 years ago

From the top of the README:

Note: you can find documentation for specific workflow rubygem versions at http://rubygems.org/gems/workflow : select a version (optional, default is latest release), click "Documentation" link.

The version on github, master branch is, well, for the master branch ;-) , the upcoming release.

geekq commented 9 years ago

P.S. Just extended the note on top of README: 8cfc9ab

posgarou commented 9 years ago

Thanks for clarifying!