lib/ruote/exp/fe_cursor.rb in ruote-2.1.11 vs lib/ruote/exp/fe_cursor.rb in ruote-2.2.0
- old
+ new
@@ -1,7 +1,7 @@
#--
-# Copyright (c) 2005-2010, John Mettraux, jmettraux@gmail.com
+# Copyright (c) 2005-2011, John Mettraux, jmettraux@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -176,22 +176,22 @@
# by itself.
#
# class Reviewer
# include Ruote::LocalParticipant
#
- # def consume (workitem)
+ # def consume(workitem)
# # somehow review the book
# if review == 'bad'
# #workitem.fields['__command__'] = [ 'rewind' ] # old style
# workitem.command = 'rewind' # new style
# else
# # let it go
# end
# reply_to_engine(workitem)
# end
#
- # def cancel (fei, flavour)
+ # def cancel(fei, flavour)
# # cancel if review is still going on...
# end
# end
#
# This example uses the Ruote::Workitem#command= method which can be fed
@@ -248,11 +248,11 @@
protected
# Determines which child expression of the cursor is to be applied next.
#
- def move_on (workitem=h.applied_workitem)
+ def move_on(workitem=h.applied_workitem)
position = workitem['fei'] == h.fei ?
-1 : Ruote::FlowExpressionId.child_id(workitem['fei'])
position += 1
@@ -284,10 +284,10 @@
end
# Jumps to an integer position, or the name of an expression
# or a tag name of a ref name.
#
- def jump_to (workitem, position, arg)
+ def jump_to(workitem, position, arg)
pos = Integer(arg) rescue nil
return pos if pos != nil