Class: Saytime

Inherits:
Object
  • Object
show all
Includes:
WaveFile
Defined in:
lib/saytime.rb

Instance Method Summary collapse

Constructor Details

#initialize(filepath = '') ⇒ Saytime

Returns a new instance of Saytime.



24
25
26
27
28
29
# File 'lib/saytime.rb', line 24

def initialize(filepath='')

  @filepath = filepath
  Dir.chdir filepath unless filepath.empty?

end

Instance Method Details

#now(wav_player = 'play') ⇒ Object



31
32
33
34
35
36
# File 'lib/saytime.rb', line 31

def now(wav_player='play')

  make_wav()
  `#{wav_player} time.wav`

end