Class: MySpeechLibrary::Speech

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

Instance Method Summary collapse

Constructor Details

#initializeSpeech

Returns a new instance of Speech.



11
12
13
14
# File 'lib/my_speech_library.rb', line 11

def initialize
  @os_detector = OSDetector.new
  @speaker = Speaker.new(@os_detector)
end

Instance Method Details

#current_osObject



20
21
22
# File 'lib/my_speech_library.rb', line 20

def current_os
  @os_detector.detect_os
end

#talk(text) ⇒ Object



16
17
18
# File 'lib/my_speech_library.rb', line 16

def talk(text)
  @speaker.speak(text)
end