Class: SayWords

Inherits:
Object
  • Object
show all
Includes:
OS
Defined in:
lib/jwords/say_words.rb

Instance Method Summary collapse

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, options={})
  @collection = collection
  @show_message = options[:show_message] || SHOW_MESSAGE
  @space_words = options[:space_words] || SPACE_WORDS
  @space_interation = options[:space_interation] || SPACE_INTERATION
end

Instance Method Details

#runObject



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