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