opentok 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +11 -0
- data/LICENCE +19 -0
- data/README.textile +43 -0
- data/doc/CHANGES.html +128 -0
- data/doc/Gemfile.html +114 -0
- data/doc/Hash.html +228 -0
- data/doc/LICENCE.html +133 -0
- data/doc/Net.html +167 -0
- data/doc/Net/HTTP.html +260 -0
- data/doc/OpenTok.html +173 -0
- data/doc/OpenTok/OpenTokException.html +172 -0
- data/doc/OpenTok/OpenTokSDK.html +520 -0
- data/doc/OpenTok/RoleConstants.html +190 -0
- data/doc/OpenTok/Session.html +284 -0
- data/doc/OpenTok/SessionPropertyConstants.html +195 -0
- data/doc/Rakefile.html +111 -0
- data/doc/created.rid +13 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +100 -0
- data/doc/js/darkfish.js +116 -0
- data/doc/js/jquery.js +32 -0
- data/doc/js/quicksearch.js +114 -0
- data/doc/js/thickbox-compressed.js +10 -0
- data/doc/lib/monkey_patches_rb.html +52 -0
- data/doc/lib/open_tok/exceptions_rb.html +52 -0
- data/doc/lib/open_tok/open_tok_sdk_rb.html +64 -0
- data/doc/lib/open_tok/session_rb.html +52 -0
- data/doc/lib/open_tok/version_rb.html +52 -0
- data/doc/lib/opentok_rb.html +70 -0
- data/doc/rdoc.css +706 -0
- data/doc/spec/opentok_spec_rb.html +54 -0
- data/doc/spec/spec_helper_rb.html +54 -0
- data/lib/monkey_patches.rb +34 -0
- data/lib/open_tok/exceptions.rb +16 -0
- data/lib/open_tok/open_tok_sdk.rb +147 -0
- data/lib/open_tok/session.rb +25 -0
- data/lib/open_tok/version.rb +3 -0
- data/lib/opentok.rb +7 -14
- data/opentok.gemspec +2 -2
- data/spec/opentok_spec.rb +64 -0
- data/spec/spec_helper.rb +2 -0
- metadata +68 -12
- data/lib/opentok/version.rb +0 -3
data/CHANGES
ADDED
data/LICENCE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2011 TokBox, Inc.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.textile
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
h1. Opentok
|
2
|
+
|
3
|
+
OpenTok is a free set of APIs from TokBox that enables websites to weave live group video communication into their online experience. With OpenTok you have the freedom and flexibility to create the most engaging web experience for your users. OpenTok is currently available as a JavaScript and ActionScript 3.0 library. Check out http://www.tokbox.com/ and http://www.tokbox.com/opentok/tools/js/gettingstarted for more information.
|
4
|
+
|
5
|
+
This is the official Opentok rubygem.
|
6
|
+
|
7
|
+
h2. Installation
|
8
|
+
|
9
|
+
To install using bundler, add Opentok to you @gemfile@ and run `bundle install`:
|
10
|
+
|
11
|
+
<pre>
|
12
|
+
gem 'opentok'
|
13
|
+
</pre>
|
14
|
+
|
15
|
+
To install as a regular gem just type `gem install opentok`
|
16
|
+
|
17
|
+
h2. How it works
|
18
|
+
|
19
|
+
h3. API-key and secret
|
20
|
+
|
21
|
+
Request your api-key and secret at http://www.tokbox.com/opentok/tools/js/apikey. You can use the staging environment for testing. The gem uses this staging environment by default.
|
22
|
+
|
23
|
+
h3. Create a session
|
24
|
+
|
25
|
+
With the following code, you can generate a valid @session_id@.
|
26
|
+
<pre>
|
27
|
+
@api_key = 0 # should be a number
|
28
|
+
@api_secret = '' # should be a string
|
29
|
+
@location = 'localhost' # give Opentok a hint on where you are running your application
|
30
|
+
|
31
|
+
@opentok = OpenTok::OpenTokSDK.new @api_key, @api_secret
|
32
|
+
|
33
|
+
@session_id @opentok.create_session(@host)
|
34
|
+
</pre>
|
35
|
+
|
36
|
+
h3. Create tokens
|
37
|
+
|
38
|
+
With the generated session_id, you can start generating tokens for each user.
|
39
|
+
<pre>
|
40
|
+
@opentok.generate_token :session_id => "#{@session_id}"
|
41
|
+
</pre>
|
42
|
+
|
43
|
+
Typically you would create one @session_id@ and store it (in e.g. a setting) and share that @session_id@ between all users.
|
data/doc/CHANGES.html
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
6
|
+
<head>
|
7
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
8
|
+
|
9
|
+
<title>File: CHANGES [RDoc Documentation]</title>
|
10
|
+
|
11
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
|
12
|
+
|
13
|
+
<script src="./js/jquery.js" type="text/javascript"
|
14
|
+
charset="utf-8"></script>
|
15
|
+
<script src="./js/thickbox-compressed.js" type="text/javascript"
|
16
|
+
charset="utf-8"></script>
|
17
|
+
<script src="./js/quicksearch.js" type="text/javascript"
|
18
|
+
charset="utf-8"></script>
|
19
|
+
<script src="./js/darkfish.js" type="text/javascript"
|
20
|
+
charset="utf-8"></script>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body class="file">
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="./index.html">Home</a>
|
29
|
+
<a href="./index.html#classes">Classes</a>
|
30
|
+
<a href="./index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="project-metadata">
|
36
|
+
|
37
|
+
|
38
|
+
<div id="fileindex-section" class="section project-section">
|
39
|
+
<h3 class="section-header">Files</h3>
|
40
|
+
<ul>
|
41
|
+
|
42
|
+
<li class="file"><a href="./CHANGES.html">CHANGES</a></li>
|
43
|
+
|
44
|
+
<li class="file"><a href="./Gemfile.html">Gemfile</a></li>
|
45
|
+
|
46
|
+
<li class="file"><a href="./LICENCE.html">LICENCE</a></li>
|
47
|
+
|
48
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
49
|
+
|
50
|
+
</ul>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
<div id="classindex-section" class="section project-section">
|
55
|
+
<h3 class="section-header">Class Index
|
56
|
+
<span class="search-toggle"><img src="./images/find.png"
|
57
|
+
height="16" width="16" alt="[+]"
|
58
|
+
title="show/hide quicksearch" /></span></h3>
|
59
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
60
|
+
<fieldset>
|
61
|
+
<legend>Quicksearch</legend>
|
62
|
+
<input type="text" name="quicksearch" value=""
|
63
|
+
class="quicksearch-field" />
|
64
|
+
</fieldset>
|
65
|
+
</form>
|
66
|
+
|
67
|
+
<ul class="link-list">
|
68
|
+
|
69
|
+
<li><a href="./OpenTok.html">OpenTok</a></li>
|
70
|
+
|
71
|
+
<li><a href="./OpenTok/OpenTokException.html">OpenTok::OpenTokException</a></li>
|
72
|
+
|
73
|
+
<li><a href="./OpenTok/OpenTokSDK.html">OpenTok::OpenTokSDK</a></li>
|
74
|
+
|
75
|
+
<li><a href="./OpenTok/RoleConstants.html">OpenTok::RoleConstants</a></li>
|
76
|
+
|
77
|
+
<li><a href="./OpenTok/Session.html">OpenTok::Session</a></li>
|
78
|
+
|
79
|
+
<li><a href="./OpenTok/SessionPropertyConstants.html">OpenTok::SessionPropertyConstants</a></li>
|
80
|
+
|
81
|
+
<li><a href="./Net.html">Net</a></li>
|
82
|
+
|
83
|
+
<li><a href="./Net/HTTP.html">Net::HTTP</a></li>
|
84
|
+
|
85
|
+
<li><a href="./Hash.html">Hash</a></li>
|
86
|
+
|
87
|
+
<li><a href="./Opentok.html">Opentok</a></li>
|
88
|
+
|
89
|
+
</ul>
|
90
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
<div id="documentation">
|
98
|
+
<h1>Change Log</h1>
|
99
|
+
<h2>Version 0.0.2</h2>
|
100
|
+
<ul>
|
101
|
+
<li><p>
|
102
|
+
Code cleanup
|
103
|
+
</p>
|
104
|
+
</li>
|
105
|
+
<li><p>
|
106
|
+
Included missing files
|
107
|
+
</p>
|
108
|
+
</li>
|
109
|
+
<li><p>
|
110
|
+
adding basic tests and documentation
|
111
|
+
</p>
|
112
|
+
</li>
|
113
|
+
</ul>
|
114
|
+
<h2>Version 0.0.1</h2>
|
115
|
+
<p>
|
116
|
+
Initial version
|
117
|
+
</p>
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<div id="validator-badges">
|
122
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
123
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
124
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
125
|
+
</div>
|
126
|
+
</body>
|
127
|
+
</html>
|
128
|
+
|
data/doc/Gemfile.html
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
6
|
+
<head>
|
7
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
8
|
+
|
9
|
+
<title>File: Gemfile [RDoc Documentation]</title>
|
10
|
+
|
11
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
|
12
|
+
|
13
|
+
<script src="./js/jquery.js" type="text/javascript"
|
14
|
+
charset="utf-8"></script>
|
15
|
+
<script src="./js/thickbox-compressed.js" type="text/javascript"
|
16
|
+
charset="utf-8"></script>
|
17
|
+
<script src="./js/quicksearch.js" type="text/javascript"
|
18
|
+
charset="utf-8"></script>
|
19
|
+
<script src="./js/darkfish.js" type="text/javascript"
|
20
|
+
charset="utf-8"></script>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body class="file">
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="./index.html">Home</a>
|
29
|
+
<a href="./index.html#classes">Classes</a>
|
30
|
+
<a href="./index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="project-metadata">
|
36
|
+
|
37
|
+
|
38
|
+
<div id="fileindex-section" class="section project-section">
|
39
|
+
<h3 class="section-header">Files</h3>
|
40
|
+
<ul>
|
41
|
+
|
42
|
+
<li class="file"><a href="./CHANGES.html">CHANGES</a></li>
|
43
|
+
|
44
|
+
<li class="file"><a href="./Gemfile.html">Gemfile</a></li>
|
45
|
+
|
46
|
+
<li class="file"><a href="./LICENCE.html">LICENCE</a></li>
|
47
|
+
|
48
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
49
|
+
|
50
|
+
</ul>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
<div id="classindex-section" class="section project-section">
|
55
|
+
<h3 class="section-header">Class Index
|
56
|
+
<span class="search-toggle"><img src="./images/find.png"
|
57
|
+
height="16" width="16" alt="[+]"
|
58
|
+
title="show/hide quicksearch" /></span></h3>
|
59
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
60
|
+
<fieldset>
|
61
|
+
<legend>Quicksearch</legend>
|
62
|
+
<input type="text" name="quicksearch" value=""
|
63
|
+
class="quicksearch-field" />
|
64
|
+
</fieldset>
|
65
|
+
</form>
|
66
|
+
|
67
|
+
<ul class="link-list">
|
68
|
+
|
69
|
+
<li><a href="./OpenTok.html">OpenTok</a></li>
|
70
|
+
|
71
|
+
<li><a href="./OpenTok/OpenTokException.html">OpenTok::OpenTokException</a></li>
|
72
|
+
|
73
|
+
<li><a href="./OpenTok/OpenTokSDK.html">OpenTok::OpenTokSDK</a></li>
|
74
|
+
|
75
|
+
<li><a href="./OpenTok/RoleConstants.html">OpenTok::RoleConstants</a></li>
|
76
|
+
|
77
|
+
<li><a href="./OpenTok/Session.html">OpenTok::Session</a></li>
|
78
|
+
|
79
|
+
<li><a href="./OpenTok/SessionPropertyConstants.html">OpenTok::SessionPropertyConstants</a></li>
|
80
|
+
|
81
|
+
<li><a href="./Net.html">Net</a></li>
|
82
|
+
|
83
|
+
<li><a href="./Net/HTTP.html">Net::HTTP</a></li>
|
84
|
+
|
85
|
+
<li><a href="./Hash.html">Hash</a></li>
|
86
|
+
|
87
|
+
<li><a href="./Opentok.html">Opentok</a></li>
|
88
|
+
|
89
|
+
</ul>
|
90
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
|
97
|
+
<div id="documentation">
|
98
|
+
<p>
|
99
|
+
source “<a href="http://rubygems.org">rubygems.org</a>“
|
100
|
+
</p>
|
101
|
+
<p>
|
102
|
+
# Specify your gem’s dependencies in opentok.gemspec gemspec
|
103
|
+
</p>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div id="validator-badges">
|
108
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
109
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
110
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
111
|
+
</div>
|
112
|
+
</body>
|
113
|
+
</html>
|
114
|
+
|
data/doc/Hash.html
ADDED
@@ -0,0 +1,228 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: Hash</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="./js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="./js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="./js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="./js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="./index.html">Home</a>
|
29
|
+
<a href="./index.html#classes">Classes</a>
|
30
|
+
<a href="./index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="file-metadata">
|
36
|
+
<div id="file-list-section" class="section">
|
37
|
+
<h3 class="section-header">In Files</h3>
|
38
|
+
<div class="section-body">
|
39
|
+
<ul>
|
40
|
+
|
41
|
+
<li><a href="./lib/monkey_patches_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/monkey_patches.rb">lib/monkey_patches.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
<div id="parent-class-section" class="section">
|
56
|
+
<h3 class="section-header">Parent</h3>
|
57
|
+
|
58
|
+
<p class="link">Object</p>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Namespace Contents -->
|
64
|
+
|
65
|
+
|
66
|
+
<!-- Method Quickref -->
|
67
|
+
|
68
|
+
<div id="method-list-section" class="section">
|
69
|
+
<h3 class="section-header">Methods</h3>
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
<li><a href="#method-i-urlencode">#urlencode</a></li>
|
73
|
+
|
74
|
+
</ul>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
|
78
|
+
<!-- Included Modules -->
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
<div id="project-metadata">
|
83
|
+
|
84
|
+
|
85
|
+
<div id="fileindex-section" class="section project-section">
|
86
|
+
<h3 class="section-header">Files</h3>
|
87
|
+
<ul>
|
88
|
+
|
89
|
+
<li class="file"><a href="./CHANGES.html">CHANGES</a></li>
|
90
|
+
|
91
|
+
<li class="file"><a href="./Gemfile.html">Gemfile</a></li>
|
92
|
+
|
93
|
+
<li class="file"><a href="./LICENCE.html">LICENCE</a></li>
|
94
|
+
|
95
|
+
<li class="file"><a href="./Rakefile.html">Rakefile</a></li>
|
96
|
+
|
97
|
+
</ul>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
|
101
|
+
<div id="classindex-section" class="section project-section">
|
102
|
+
<h3 class="section-header">Class Index
|
103
|
+
<span class="search-toggle"><img src="./images/find.png"
|
104
|
+
height="16" width="16" alt="[+]"
|
105
|
+
title="show/hide quicksearch" /></span></h3>
|
106
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
107
|
+
<fieldset>
|
108
|
+
<legend>Quicksearch</legend>
|
109
|
+
<input type="text" name="quicksearch" value=""
|
110
|
+
class="quicksearch-field" />
|
111
|
+
</fieldset>
|
112
|
+
</form>
|
113
|
+
|
114
|
+
<ul class="link-list">
|
115
|
+
|
116
|
+
<li><a href="./OpenTok.html">OpenTok</a></li>
|
117
|
+
|
118
|
+
<li><a href="./OpenTok/OpenTokException.html">OpenTok::OpenTokException</a></li>
|
119
|
+
|
120
|
+
<li><a href="./OpenTok/OpenTokSDK.html">OpenTok::OpenTokSDK</a></li>
|
121
|
+
|
122
|
+
<li><a href="./OpenTok/RoleConstants.html">OpenTok::RoleConstants</a></li>
|
123
|
+
|
124
|
+
<li><a href="./OpenTok/Session.html">OpenTok::Session</a></li>
|
125
|
+
|
126
|
+
<li><a href="./OpenTok/SessionPropertyConstants.html">OpenTok::SessionPropertyConstants</a></li>
|
127
|
+
|
128
|
+
<li><a href="./Net.html">Net</a></li>
|
129
|
+
|
130
|
+
<li><a href="./Net/HTTP.html">Net::HTTP</a></li>
|
131
|
+
|
132
|
+
<li><a href="./Hash.html">Hash</a></li>
|
133
|
+
|
134
|
+
<li><a href="./Opentok.html">Opentok</a></li>
|
135
|
+
|
136
|
+
</ul>
|
137
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
138
|
+
</div>
|
139
|
+
|
140
|
+
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
|
144
|
+
<div id="documentation">
|
145
|
+
<h1 class="class">Hash</h1>
|
146
|
+
|
147
|
+
<div id="description">
|
148
|
+
|
149
|
+
</div>
|
150
|
+
|
151
|
+
<!-- Constants -->
|
152
|
+
|
153
|
+
|
154
|
+
<!-- Attributes -->
|
155
|
+
|
156
|
+
|
157
|
+
<!-- Methods -->
|
158
|
+
|
159
|
+
<div id="public-instance-method-details" class="method-section section">
|
160
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
161
|
+
|
162
|
+
|
163
|
+
<div id="urlencode-method" class="method-detail ">
|
164
|
+
<a name="method-i-urlencode"></a>
|
165
|
+
|
166
|
+
<div class="method-heading">
|
167
|
+
|
168
|
+
<span class="method-name">urlencode</span><span
|
169
|
+
class="method-args">()</span>
|
170
|
+
<span class="method-click-advice">click to toggle source</span>
|
171
|
+
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<div class="method-description">
|
175
|
+
|
176
|
+
<p>
|
177
|
+
Adding a urlencode method to the hash class for easy querstring generation
|
178
|
+
</p>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
<div class="method-source-code"
|
183
|
+
id="urlencode-source">
|
184
|
+
<pre>
|
185
|
+
<span class="ruby-comment cmt"># File lib/monkey_patches.rb, line 13</span>
|
186
|
+
13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">urlencode</span>
|
187
|
+
14: <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name_value</span><span class="ruby-operator">|</span>
|
188
|
+
15: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name_value</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
|
189
|
+
16: <span class="ruby-identifier">name_value</span>[<span class="ruby-value">0</span>] = <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">escape</span> <span class="ruby-identifier">name_value</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">to_s</span>
|
190
|
+
17: <span class="ruby-identifier">name_value</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">escape</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span> }
|
191
|
+
18: <span class="ruby-identifier">name_value</span>[<span class="ruby-value">1</span>] = <span class="ruby-identifier">name_value</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">join</span> <span class="ruby-value str">"&"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">name_value</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">"="</span>
|
192
|
+
19: <span class="ruby-identifier">name_value</span>.<span class="ruby-identifier">join</span> <span class="ruby-value str">'='</span>
|
193
|
+
20: <span class="ruby-keyword kw">else</span>
|
194
|
+
21: <span class="ruby-identifier">name_value</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">escape</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span> }.<span class="ruby-identifier">join</span> <span class="ruby-value str">'='</span>
|
195
|
+
22: <span class="ruby-keyword kw">end</span>
|
196
|
+
23: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span> <span class="ruby-value str">'&'</span>
|
197
|
+
24: <span class="ruby-keyword kw">end</span></pre>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
</div>
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
</div>
|
206
|
+
|
207
|
+
|
208
|
+
</div>
|
209
|
+
|
210
|
+
|
211
|
+
</div>
|
212
|
+
|
213
|
+
|
214
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
215
|
+
|
216
|
+
<p>Disabled; run with --debug to generate this.</p>
|
217
|
+
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div id="validator-badges">
|
221
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
222
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
223
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
224
|
+
</div>
|
225
|
+
|
226
|
+
</body>
|
227
|
+
</html>
|
228
|
+
|