Class: CEML::Recognizer

Inherits:
Object
  • Object
show all
Defined in:
lib/ceml/recognizer.rb

Class Method Summary collapse

Class Method Details

.recognize(msg) ⇒ Object



3
4
5
6
7
# File 'lib/ceml/recognizer.rb', line 3

def self.recognize msg
  return :yes if msg == 'y' || msg =~ /^yes/i
  return :abort if msg == 'abort'
  return :done if msg =~ /^done/i || msg == 'd'
end