Class: Skype::Application::Stream

Inherits:
Object
  • Object
show all
Defined in:
lib/skype/application.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, streamString) ⇒ Stream

Returns a new instance of Stream.



4
5
6
7
8
# File 'lib/skype/application.rb', line 4

def initialize app, streamString
  @app = app
  @id = streamString
  @user = Skype.user(@id.split(':')[0])
end

Instance Method Details

#datagram(msg, &block) ⇒ Object



22
23
24
# File 'lib/skype/application.rb', line 22

def datagram msg, &block
  @app.datagram self, cmd
end

#disconnectObject



30
31
32
# File 'lib/skype/application.rb', line 30

def disconnect
  @app.disconnect self
end

#readObject



26
27
28
# File 'lib/skype/application.rb', line 26

def read
  @app.read self
end

#to_sObject



10
11
12
# File 'lib/skype/application.rb', line 10

def to_s
  @id
end

#userObject



14
15
16
# File 'lib/skype/application.rb', line 14

def user
  @user
end

#write(msg) ⇒ Object



18
19
20
# File 'lib/skype/application.rb', line 18

def write msg
  @app.write self, cmd
end