Class: MySpeechLibrary::Speech
- Inherits:
-
Object
- Object
- MySpeechLibrary::Speech
- Defined in:
- lib/my_speech_library.rb
Instance Method Summary collapse
- #current_os ⇒ Object
-
#initialize ⇒ Speech
constructor
A new instance of Speech.
- #talk(text) ⇒ Object
Constructor Details
#initialize ⇒ Speech
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_os ⇒ Object
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 |