Class: Mac::Skype::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/mac-skype/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApi

Returns a new instance of Api.



6
7
8
9
# File 'lib/mac-skype/api.rb', line 6

def initialize
  @attach = 0
  init
end

Instance Attribute Details

#attachObject

Returns the value of attribute attach.



4
5
6
# File 'lib/mac-skype/api.rb', line 4

def attach
  @attach
end

#callbackObject

Returns the value of attribute callback.



4
5
6
# File 'lib/mac-skype/api.rb', line 4

def callback
  @callback
end

Instance Method Details

#debug?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/mac-skype/api.rb', line 11

def debug?
  !ENV['DEBUG'].nil?
end

#receive_event(response) ⇒ Object



15
16
17
18
19
# File 'lib/mac-skype/api.rb', line 15

def receive_event(response)
  if callback
    callback.call(response)
  end
end