Class: Dictation::ControlCenter

Inherits:
Object
  • Object
show all
Defined in:
lib/dictation/control_center.rb

Class Method Summary collapse

Class Method Details

.launchObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/dictation/control_center.rb', line 4

def launch
  if OperatingSystem.supported?
    command = ARGV[0]
    options = Commander.order(ARGV)
    case command
    when 'new'
      execute_new(options)
    when 'add'
      execute_add(options)
    when 'dictate'
      execute_dictate(options)
    when 'verify'
      execute_verify(options)
    end
  else
    puts 'Sorry, your Operating System is not supported.  Only Mac OSX has built-in TTS (Text-to-Speech).'
  end
end