lib/punchblock/translator/input_component.rb in punchblock-1.8.2 vs lib/punchblock/translator/input_component.rb in punchblock-1.9.0
- old
+ new
@@ -4,12 +4,11 @@
module Translator
module InputComponent
def execute
validate
- component = current_actor
- @recognizer = DTMFRecognizer.new current_actor,
+ @recognizer = DTMFRecognizer.new self,
@component_node.grammar.value,
(@component_node.initial_timeout || -1),
(@component_node.inter_digit_timeout || -1)
send_ref
@@ -52,9 +51,10 @@
raise OptionError, 'A mode value other than DTMF is unsupported.' unless @component_node.mode == :dtmf
end
def complete(reason)
unregister_dtmf_event_handler
+ @recognizer.finalize if @recognizer
send_complete_event reason
end
end
end
end