Class: FSR::App::Playback

Inherits:
Application show all
Defined in:
lib/fsr/app/playback.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Application

#app_name, #raw, #to_s

Constructor Details

#initialize(wavfile) ⇒ Playback

Returns a new instance of Playback.



8
9
10
11
# File 'lib/fsr/app/playback.rb', line 8

def initialize(wavfile)
  # wav file you wish to play, full path 
  @wavfile = wavfile
end

Instance Attribute Details

#wavfileObject (readonly)

Returns the value of attribute wavfile.



6
7
8
# File 'lib/fsr/app/playback.rb', line 6

def wavfile
  @wavfile
end

Instance Method Details

#argumentsObject



12
13
14
# File 'lib/fsr/app/playback.rb', line 12

def arguments
  [@wavfile]
end

#sendmsgObject



16
17
18
# File 'lib/fsr/app/playback.rb', line 16

def sendmsg
  "call-command: execute\nexecute-app-name: %s\nexecute-app-arg: %s\nevent-lock:true\n\n" % [app_name, arguments.join(" ")] 
end