Skip to content

Commit f3da860

Browse files
authored
another syntax block
1 parent 38231db commit f3da860

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.adoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,11 @@ article2.review!('Homer Simpson') # => [Homer Simpson] is now reviewing the arti
201201
Alternative way is to use a block (only recommended for short event
202202
implementation without further code nesting):
203203
204-
event :review, :transitions_to => :being_reviewed do |reviewer|
205-
# store the reviewer
206-
end
204+
```rb
205+
event :review, :transitions_to => :being_reviewed do |reviewer|
206+
# store the reviewer
207+
end
208+
```
207209
208210
We've noticed, that mixing the list of events and states with the blocks
209211
invoked for particular transitions leads to a bumpy and poorly readable code

0 commit comments

Comments
 (0)