lib/ruby_speech/grxml/element.rb in ruby_speech-0.5.0 vs lib/ruby_speech/grxml/element.rb in ruby_speech-0.5.1

- old
+ new

@@ -20,8 +20,25 @@ include GenericElement def regexp_content # :nodoc: children.map(&:regexp_content).join end + + def potential_match?(other) + false + end + + def max_input_length + 0 + end + + def longest_potential_match(input) + input.dup.tap do |longest_input| + begin + return longest_input if potential_match? longest_input + longest_input.chop! + end until longest_input.length.zero? + end + end end # Element end # GRXML end # RubySpeech