Class: FSR::Cmd::ValetInfo
Constant Summary
Constants inherited from Command
Instance Method Summary collapse
-
#initialize(fs_socket = nil) ⇒ ValetInfo
constructor
A new instance of ValetInfo.
-
#raw ⇒ Object
This method builds the API command to send to the freeswitch event socket.
-
#run(api_method = :api) ⇒ Object
Send the command to the event socket, using bgapi by default.
Constructor Details
#initialize(fs_socket = nil) ⇒ ValetInfo
Returns a new instance of ValetInfo.
6 7 8 |
# File 'lib/fsr/cmd/valet_info.rb', line 6 def initialize(fs_socket = nil) @fs_socket = fs_socket # FSR::CommandSocket obj end |
Instance Method Details
#raw ⇒ Object
This method builds the API command to send to the freeswitch event socket
18 19 20 |
# File 'lib/fsr/cmd/valet_info.rb', line 18 def raw orig_command = "valet_info" end |
#run(api_method = :api) ⇒ Object
Send the command to the event socket, using bgapi by default.
11 12 13 14 15 |
# File 'lib/fsr/cmd/valet_info.rb', line 11 def run(api_method = :api) orig_command = "%s %s" % [api_method, raw] Log.debug "saying #{orig_command}" @fs_socket.say(orig_command) end |