Class: Saytime

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

Instance Method Summary collapse

Methods included from LIBRARY

#fetch_file, #fetch_filepath, #read

Constructor Details

#initialize(filepath = '') ⇒ Saytime

Returns a new instance of Saytime.



47
48
49
50
51
52
# File 'lib/saytime.rb', line 47

def initialize(filepath='')

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

end

Instance Method Details

#now(wav_player = 'play') ⇒ Object



54
55
56
57
58
59
# File 'lib/saytime.rb', line 54

def now(wav_player='play')

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

end