Class: SayWords
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SayWords
constructor
A new instance of SayWords.
- #run ⇒ Object
Methods included from OS
#linux?, #mac?, #unix?, #windows?
Constructor Details
#initialize(options = {}) ⇒ SayWords
Returns a new instance of SayWords.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/jwords/say_words.rb', line 4 def initialize(={}) @db = DbWords.new @collection = @db.collection @show_message = [:show_message].nil? ? SHOW_MESSAGE : [:show_message] @space_words = [:space_words] || SPACE_WORDS @space_interation = [:space_interation] || SPACE_INTERATION @mac_word_voice = [:mac_word_voice] || MAC_WORD_VOICE @mac_translate_voice = [:mac_translate_voice] || MAC_TRANSLATE_VOICE @repeat = [:repeat] || REPEAT end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/jwords/say_words.rb', line 15 def run if mac? do_mac elsif linux? do_ubuntu end end |