james 0.3.0-universal-darwin-10 → 0.4.0-universal-darwin-10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/james/markers/marker.rb +4 -2
- data/lib/james/outputs/audio.rb +5 -0
- metadata +1 -1
data/lib/james/markers/marker.rb
CHANGED
@@ -46,7 +46,9 @@ module James
|
|
46
46
|
def transition phrase
|
47
47
|
state_or_lambda = current.next_for phrase
|
48
48
|
if state_or_lambda.respond_to?(:call)
|
49
|
-
current.__transition__ &state_or_lambda # Don't transition.
|
49
|
+
result = current.__transition__ &state_or_lambda # Don't transition.
|
50
|
+
yield result if result && block_given?
|
51
|
+
result
|
50
52
|
else
|
51
53
|
self.current = state_or_lambda
|
52
54
|
end
|
@@ -63,7 +65,7 @@ module James
|
|
63
65
|
def process phrase, &block
|
64
66
|
exit_text = exit &block
|
65
67
|
last_context = current.context
|
66
|
-
transition phrase
|
68
|
+
transition phrase, &block
|
67
69
|
check &block
|
68
70
|
into_text = enter &block
|
69
71
|
last_context != current.context
|
data/lib/james/outputs/audio.rb
CHANGED