Class: FSR::App::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/fsr/app.rb

Instance Method Summary collapse

Instance Method Details

#app_nameObject



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

def app_name
  self.class.name.split("::").last.downcase
end

#rawObject

This method builds the API command to send to freeswitch



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

def raw
  "%s(%s)" % [app_name, arguments.join(" ")]
end

#sendmsgObject



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

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

#to_sObject



4
5
6
# File 'lib/fsr/app.rb', line 4

def to_s
  sendmsg
end