Permalink
Browse files

Updated documentation

  • Loading branch information...
1 parent 4435c7d commit 7d3a598dcccf77d5a5c8582c990f03f2211a8b6e @p8 committed Sep 6, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 README.rdoc
View
8 README.rdoc
@@ -36,6 +36,14 @@ This will prevent the state from being changed.
end
end
+=== Example usage with exceptions
+You can rescue exceptions and specify the failure state
+
+ def download_data
+ Service.download_data
+ end
+ event :download_data, :pending => :downloaded,
+ Service::ConnectionError => :download_failed
== More complete implementation

0 comments on commit 7d3a598

Please sign in to comment.