Class: TokBoxer::Call

Inherits:
Object
  • Object
show all
Defined in:
lib/TokBoxer/Call.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(callerName, callId, callerJabberId, persistent, server, api) ⇒ Call

Returns a new instance of Call.



8
9
10
11
12
13
14
15
# File 'lib/TokBoxer/Call.rb', line 8

def initialize(callerName, callId, callerJabberId, persistent, server, api)
  @callerName     = callerName
  @callId         = callId
  @callerJabberId = callerJabberId
  @persistent     = persistent
  @server         = server
  @api            = api
end

Instance Attribute Details

#callerJabberIdObject (readonly)

Returns the value of attribute callerJabberId.



5
6
7
# File 'lib/TokBoxer/Call.rb', line 5

def callerJabberId
  @callerJabberId
end

#callerNameObject (readonly)

Returns the value of attribute callerName.



5
6
7
# File 'lib/TokBoxer/Call.rb', line 5

def callerName
  @callerName
end

#callIdObject (readonly) Also known as: id

Returns the value of attribute callId.



5
6
7
# File 'lib/TokBoxer/Call.rb', line 5

def callId
  @callId
end

#persistentObject (readonly)

Returns the value of attribute persistent.



5
6
7
# File 'lib/TokBoxer/Call.rb', line 5

def persistent
  @persistent
end

#serverObject (readonly)

Returns the value of attribute server.



5
6
7
# File 'lib/TokBoxer/Call.rb', line 5

def server
  @server
end

Instance Method Details

#embed_code(width = "322", height = "321") ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/TokBoxer/Call.rb', line 17

def embed_code(width="322", height="321")
  <<-END
  <object width="#{width}" height="#{height}">
      <param name="movie" value="#{@api.api_server_url}#{API_SERVER_CALL_WIDGET}#{id}" />
      <param name="allowFullScreen" value="true" />
      <param name="allowScriptAccess" value="true" />
      <param name="flashVars" value="textChat=true&guestList=false&inviteButton=false" />
      <embed src="#{@api.api_server_url}#{API_SERVER_CALL_WIDGET}#{id}"
             type="application/x-shockwave-flash"
             allowfullscreen="true"
             allowScriptAccess="always"
             width="#{width}"
             height="#{height}"
             flashvars="textChat=true&guestList=false&inviteButton=false" >
      </embed>
  </object>
  END
end

#to_sObject



36
37
38
# File 'lib/TokBoxer/Call.rb', line 36

def to_s
  id
end