Module: VoiceForm::InstanceMethods

Defined in:
lib/voice_form/form_methods.rb

Instance Method Summary collapse

Instance Method Details

#as_digits(string) ⇒ Object



42
43
44
# File 'lib/voice_form/form_methods.rb', line 42

def as_digits(string)
  string.scan(/\d/).map {|v| v.to_i }
end

#start_voice_form(call) ⇒ Object



34
35
36
37
38
39
40
# File 'lib/voice_form/form_methods.rb', line 34

def start_voice_form(call)
  raise "No voice form defined" unless self.class.voice_form_options
  options, block = *self.class.voice_form_options
  @call = call
  self.form = VoiceForm::Form.new(options, &block)
  self.form.run(self)
end