class Skype::Call
Attributes
id[R]
time[R]
to[R]
Public Class Methods
new(id)
click to toggle source
# File lib/skype/wrappers/call.rb, line 11 def initialize(id) @id = id.to_i @time = Time.at ::Skype.exec("GET CALL #{id} TIMESTAMP").split(/\s/).last.to_i @to = ::Skype.exec("GET CALL #{id} PARTNER_HANDLE").scan(/PARTNER_HANDLE (.+)$/)[0][0] rescue @to = "" end
Public Instance Methods
hangup()
click to toggle source
# File lib/skype/wrappers/call.rb, line 29 def hangup ::Skype.exec "ALTER CALL #{@id} HANGUP" end
status()
click to toggle source
# File lib/skype/wrappers/call.rb, line 17 def status begin return ::Skype.exec("GET CALL #{@id} STATUS", :response_filter => false).scan(/([A-Z]+)$/)[0][0].downcase.to_sym rescue return :api_error end end
talking?()
click to toggle source
# File lib/skype/wrappers/call.rb, line 25 def talking? status == :inprogress end