opentok 2.2.4 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +44 -17
- data/doc/OpenTok.html +20 -13
- data/doc/OpenTok/Archive.html +350 -68
- data/doc/OpenTok/ArchiveList.html +3 -3
- data/doc/OpenTok/Archives.html +114 -42
- data/doc/OpenTok/HashExtensions.html +184 -0
- data/doc/OpenTok/OpenTok.html +89 -44
- data/doc/OpenTok/OpenTokArchiveError.html +3 -3
- data/doc/OpenTok/OpenTokAuthenticationError.html +3 -3
- data/doc/OpenTok/OpenTokError.html +3 -3
- data/doc/OpenTok/Session.html +116 -24
- data/doc/_index.html +22 -7
- data/doc/class_list.html +6 -2
- data/doc/file.README.html +3 -3
- data/doc/file_list.html +5 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +3 -3
- data/doc/js/full_list.js +4 -1
- data/doc/method_list.html +45 -11
- data/doc/top-level-namespace.html +3 -3
- data/lib/extensions/hash.rb +12 -0
- data/lib/opentok/archive.rb +22 -2
- data/lib/opentok/archives.rb +33 -6
- data/lib/opentok/client.rb +21 -4
- data/lib/opentok/constants.rb +1 -0
- data/lib/opentok/opentok.rb +25 -13
- data/lib/opentok/session.rb +6 -3
- data/lib/opentok/version.rb +1 -1
- data/sample/Archiving/README.md +16 -10
- data/sample/Archiving/archiving_sample.rb +6 -3
- data/sample/Archiving/public/js/host.js +25 -12
- data/sample/Archiving/views/host.erb +24 -0
- data/sample/HelloWorld/README.md +1 -1
- data/spec/cassettes/OpenTok_Archives/should_create_archives.yml +1 -1
- data/spec/cassettes/OpenTok_Archives/should_create_audio_only_archives.yml +50 -0
- data/spec/cassettes/OpenTok_Archives/should_create_individual_archives.yml +51 -0
- data/spec/cassettes/OpenTok_Archives/should_find_paused_archives_by_id.yml +46 -0
- data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_always_archived_sessions.yml +39 -0
- data/spec/opentok/archives_spec.rb +32 -0
- data/spec/opentok/opentok_spec.rb +27 -3
- data/spec/spec_helper.rb +1 -0
- metadata +36 -26
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: OpenTok::ArchiveList
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -207,9 +207,9 @@
|
|
207
207
|
</div>
|
208
208
|
|
209
209
|
<div id="footer">
|
210
|
-
Generated on
|
210
|
+
Generated on Mon May 25 15:52:46 2015 by
|
211
211
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
212
|
-
0.8.7.
|
212
|
+
0.8.7.6 (ruby-1.9.3).
|
213
213
|
</div>
|
214
214
|
|
215
215
|
</body>
|
data/doc/OpenTok/Archives.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: OpenTok::Archives
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -102,7 +102,7 @@
|
|
102
102
|
<h2>Overview</h2><div class="docstring">
|
103
103
|
<div class="discussion">
|
104
104
|
|
105
|
-
<p>A class for working with OpenTok
|
105
|
+
<p>A class for working with OpenTok archives.</p>
|
106
106
|
|
107
107
|
|
108
108
|
</div>
|
@@ -168,7 +168,7 @@ and in-progress, for your API key.</p>
|
|
168
168
|
|
169
169
|
|
170
170
|
<span class="summary_desc"><div class='inline'>
|
171
|
-
<p>Starts archiving an OpenTok
|
171
|
+
<p>Starts archiving an OpenTok session.</p>
|
172
172
|
</div></span>
|
173
173
|
|
174
174
|
</li>
|
@@ -373,14 +373,14 @@ archives returned is 1000.</p>
|
|
373
373
|
<pre class="lines">
|
374
374
|
|
375
375
|
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
376
|
+
101
|
377
|
+
102
|
378
|
+
103
|
379
|
+
104
|
380
|
+
105</pre>
|
381
381
|
</td>
|
382
382
|
<td>
|
383
|
-
<pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line
|
383
|
+
<pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line 101</span>
|
384
384
|
|
385
385
|
<span class='kw'>def</span> <span class='id identifier rubyid_all'>all</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
386
386
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Limit is invalid</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:count</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='lparen'>(</span><span class='int'>0</span><span class='op'>..</span><span class='int'>100</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:count</span><span class='rbracket'>]</span>
|
@@ -404,7 +404,7 @@ archives returned is 1000.</p>
|
|
404
404
|
</h3><div class="docstring">
|
405
405
|
<div class="discussion">
|
406
406
|
|
407
|
-
<p>Starts archiving an OpenTok
|
407
|
+
<p>Starts archiving an OpenTok session.</p>
|
408
408
|
|
409
409
|
<p>Clients must be actively connected to the OpenTok session for you to
|
410
410
|
successfully start recording an archive.</p>
|
@@ -414,6 +414,12 @@ record archives of sessions that use the OpenTok Media Router (sessions
|
|
414
414
|
with the media mode set to routed); you cannot archive sessions with the
|
415
415
|
media mode set to relayed.</p>
|
416
416
|
|
417
|
+
<p>For more information on archiving, see the
|
418
|
+
<a href="https://tokbox.com/opentok/tutorials/archiving" target="_parent" title="OpenTok archiving">OpenTok archiving</a>
|
419
|
+
programming guide.</p>
|
420
|
+
|
421
|
+
<p>:name.</p>
|
422
|
+
|
417
423
|
|
418
424
|
</div>
|
419
425
|
</div>
|
@@ -450,7 +456,7 @@ media mode set to relayed.</p>
|
|
450
456
|
|
451
457
|
—
|
452
458
|
<div class='inline'>
|
453
|
-
<p>A hash with the key ‘name’ or
|
459
|
+
<p>A hash with the key ‘name’, ‘has_audio’, and ‘has_video’ (or</p>
|
454
460
|
</div>
|
455
461
|
|
456
462
|
</li>
|
@@ -475,7 +481,57 @@ media mode set to relayed.</p>
|
|
475
481
|
— <div class='inline'>
|
476
482
|
<p>This is the name of the archive. You can use this name to identify the
|
477
483
|
archive. It is a property of the Archive object, and it is a property of
|
478
|
-
archive-related events in the OpenTok
|
484
|
+
archive-related events in the OpenTok client SDKs.</p>
|
485
|
+
</div>
|
486
|
+
|
487
|
+
</li>
|
488
|
+
|
489
|
+
<li>
|
490
|
+
<span class="name">:has_audio</span>
|
491
|
+
<span class="type">(<tt>true</tt>, <tt>false</tt>)</span>
|
492
|
+
<span class="default">
|
493
|
+
|
494
|
+
</span>
|
495
|
+
|
496
|
+
— <div class='inline'>
|
497
|
+
<p>Whether the archive will include an audio track (<tt>true</tt>) or not
|
498
|
+
<tt>false</tt>). The default value is <tt>true</tt> (an audio track is
|
499
|
+
included). If you set both <tt>has_audio</tt> and <tt>has_video</tt> to
|
500
|
+
<tt>false</tt>, the call to the <tt>create()</tt> method results in an
|
501
|
+
error.</p>
|
502
|
+
</div>
|
503
|
+
|
504
|
+
</li>
|
505
|
+
|
506
|
+
<li>
|
507
|
+
<span class="name">:has_video</span>
|
508
|
+
<span class="type">(<tt>true</tt>, <tt>false</tt>)</span>
|
509
|
+
<span class="default">
|
510
|
+
|
511
|
+
</span>
|
512
|
+
|
513
|
+
— <div class='inline'>
|
514
|
+
<p>Whether the archive will include a video track (<tt>true</tt>) or not
|
515
|
+
<tt>false</tt>). The default value is <tt>true</tt> (a video track is
|
516
|
+
included). If you set both <tt>has_audio</tt> and <tt>has_video</tt> to
|
517
|
+
<tt>false</tt>, the call to the <tt>create()</tt> method results in an
|
518
|
+
error.</p>
|
519
|
+
</div>
|
520
|
+
|
521
|
+
</li>
|
522
|
+
|
523
|
+
<li>
|
524
|
+
<span class="name">:output_mode</span>
|
525
|
+
<span class="type">(<tt>String</tt>)</span>
|
526
|
+
<span class="default">
|
527
|
+
|
528
|
+
</span>
|
529
|
+
|
530
|
+
— <div class='inline'>
|
531
|
+
<p>Whether all streams in the archive are recorded to a single file
|
532
|
+
(<tt>:composed</tt>, the default) or to individual files
|
533
|
+
(<tt>:individual</tt>). For more information on archiving and the archive
|
534
|
+
file formats, see the <a href="https://tokbox.com/opentok/tutorials/archiving" target="_parent" title="OpenTok archiving">OpenTok archiving</a> programming guide.</p>
|
479
535
|
</div>
|
480
536
|
|
481
537
|
</li>
|
@@ -585,21 +641,37 @@ session is already being recorded.</p>
|
|
585
641
|
<pre class="lines">
|
586
642
|
|
587
643
|
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
644
|
+
59
|
645
|
+
60
|
646
|
+
61
|
647
|
+
62
|
648
|
+
63
|
649
|
+
64
|
650
|
+
65
|
651
|
+
66
|
652
|
+
67
|
653
|
+
68
|
654
|
+
69
|
655
|
+
70
|
656
|
+
71
|
657
|
+
72
|
658
|
+
73</pre>
|
595
659
|
</td>
|
596
660
|
<td>
|
597
|
-
<pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line
|
661
|
+
<pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line 59</span>
|
598
662
|
|
599
663
|
<span class='kw'>def</span> <span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_session_id'>session_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
600
664
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>session_id not provided</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_session_id'>session_id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
601
|
-
|
602
|
-
<span class='
|
665
|
+
|
666
|
+
<span class='comment'># normalize opts so all keys are symbols and only include valid_opts
|
667
|
+
</span> <span class='id identifier rubyid_valid_opts'>valid_opts</span> <span class='op'>=</span> <span class='lbracket'>[</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='symbol'>:has_audio</span><span class='comma'>,</span> <span class='symbol'>:has_video</span><span class='comma'>,</span> <span class='symbol'>:output_mode</span> <span class='rbracket'>]</span>
|
668
|
+
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='comma'>,</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span><span class='op'>|</span>
|
669
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_valid_opts'>valid_opts</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
|
670
|
+
<span class='id identifier rubyid_m'>m</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span>
|
671
|
+
<span class='kw'>end</span>
|
672
|
+
<span class='id identifier rubyid_m'>m</span>
|
673
|
+
<span class='kw'>end</span>
|
674
|
+
|
603
675
|
<span class='id identifier rubyid_archive_json'>archive_json</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_start_archive'>start_archive</span><span class='lparen'>(</span><span class='id identifier rubyid_session_id'>session_id</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
604
676
|
<span class='const'>Archive</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_archive_json'>archive_json</span>
|
605
677
|
<span class='kw'>end</span></pre>
|
@@ -707,14 +779,14 @@ archive remains deleted.</p>
|
|
707
779
|
<pre class="lines">
|
708
780
|
|
709
781
|
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
782
|
+
141
|
783
|
+
142
|
784
|
+
143
|
785
|
+
144
|
786
|
+
145</pre>
|
715
787
|
</td>
|
716
788
|
<td>
|
717
|
-
<pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line
|
789
|
+
<pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line 141</span>
|
718
790
|
|
719
791
|
<span class='kw'>def</span> <span class='id identifier rubyid_delete_by_id'>delete_by_id</span><span class='lparen'>(</span><span class='id identifier rubyid_archive_id'>archive_id</span><span class='rparen'>)</span>
|
720
792
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>archive_id not provided</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_archive_id'>archive_id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
@@ -836,14 +908,14 @@ archive remains deleted.</p>
|
|
836
908
|
<pre class="lines">
|
837
909
|
|
838
910
|
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
911
|
+
84
|
912
|
+
85
|
913
|
+
86
|
914
|
+
87
|
915
|
+
88</pre>
|
844
916
|
</td>
|
845
917
|
<td>
|
846
|
-
<pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line
|
918
|
+
<pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line 84</span>
|
847
919
|
|
848
920
|
<span class='kw'>def</span> <span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_archive_id'>archive_id</span><span class='rparen'>)</span>
|
849
921
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>archive_id not provided</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_archive_id'>archive_id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
@@ -996,14 +1068,14 @@ have disconnected from the session being archived.</p>
|
|
996
1068
|
<pre class="lines">
|
997
1069
|
|
998
1070
|
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1071
|
+
122
|
1072
|
+
123
|
1073
|
+
124
|
1074
|
+
125
|
1075
|
+
126</pre>
|
1004
1076
|
</td>
|
1005
1077
|
<td>
|
1006
|
-
<pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line
|
1078
|
+
<pre class="code"><span class="info file"># File 'lib/opentok/archives.rb', line 122</span>
|
1007
1079
|
|
1008
1080
|
<span class='kw'>def</span> <span class='id identifier rubyid_stop_by_id'>stop_by_id</span><span class='lparen'>(</span><span class='id identifier rubyid_archive_id'>archive_id</span><span class='rparen'>)</span>
|
1009
1081
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>archive_id not provided</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_archive_id'>archive_id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
@@ -1020,9 +1092,9 @@ have disconnected from the session being archived.</p>
|
|
1020
1092
|
</div>
|
1021
1093
|
|
1022
1094
|
<div id="footer">
|
1023
|
-
Generated on
|
1095
|
+
Generated on Mon May 25 15:52:46 2015 by
|
1024
1096
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1025
|
-
0.8.7.
|
1097
|
+
0.8.7.6 (ruby-1.9.3).
|
1026
1098
|
</div>
|
1027
1099
|
|
1028
1100
|
</body>
|
@@ -0,0 +1,184 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Module: OpenTok::HashExtensions
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!OpenTok/HashExtensions.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (H)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../OpenTok.html" title="OpenTok (module)">OpenTok</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">HashExtensions</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Module: OpenTok::HashExtensions
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<dt class="r1 last">Defined in:</dt>
|
82
|
+
<dd class="r1 last">lib/extensions/hash.rb</dd>
|
83
|
+
|
84
|
+
</dl>
|
85
|
+
<div class="clear"></div>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<h2>
|
96
|
+
Instance Method Summary
|
97
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
98
|
+
</h2>
|
99
|
+
|
100
|
+
<ul class="summary">
|
101
|
+
|
102
|
+
<li class="public ">
|
103
|
+
<span class="summary_signature">
|
104
|
+
|
105
|
+
<a href="#camelize_keys%21-instance_method" title="#camelize_keys! (instance method)">- (Object) <strong>camelize_keys!</strong> </a>
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
</span>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
120
|
+
|
121
|
+
</li>
|
122
|
+
|
123
|
+
|
124
|
+
</ul>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
<div id="instance_method_details" class="method_details_list">
|
130
|
+
<h2>Instance Method Details</h2>
|
131
|
+
|
132
|
+
|
133
|
+
<div class="method_details first">
|
134
|
+
<h3 class="signature first" id="camelize_keys!-instance_method">
|
135
|
+
|
136
|
+
- (<tt>Object</tt>) <strong>camelize_keys!</strong>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
</h3><table class="source_code">
|
143
|
+
<tr>
|
144
|
+
<td>
|
145
|
+
<pre class="lines">
|
146
|
+
|
147
|
+
|
148
|
+
3
|
149
|
+
4
|
150
|
+
5
|
151
|
+
6
|
152
|
+
7
|
153
|
+
8
|
154
|
+
9
|
155
|
+
10</pre>
|
156
|
+
</td>
|
157
|
+
<td>
|
158
|
+
<pre class="code"><span class="info file"># File 'lib/extensions/hash.rb', line 3</span>
|
159
|
+
|
160
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_camelize_keys!'>camelize_keys!</span>
|
161
|
+
<span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span>
|
162
|
+
<span class='id identifier rubyid_new_key'>new_key</span> <span class='op'>=</span> <span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span><span class='lparen'>(</span><span class='symbol'>:lower</span><span class='rparen'>)</span>
|
163
|
+
<span class='id identifier rubyid_new_key'>new_key</span> <span class='op'>=</span> <span class='id identifier rubyid_new_key'>new_key</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='kw'>if</span> <span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Symbol</span>
|
164
|
+
<span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_new_key'>new_key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span>
|
165
|
+
<span class='kw'>end</span>
|
166
|
+
<span class='kw'>self</span>
|
167
|
+
<span class='kw'>end</span></pre>
|
168
|
+
</td>
|
169
|
+
</tr>
|
170
|
+
</table>
|
171
|
+
</div>
|
172
|
+
|
173
|
+
</div>
|
174
|
+
|
175
|
+
</div>
|
176
|
+
|
177
|
+
<div id="footer">
|
178
|
+
Generated on Mon May 25 15:52:46 2015 by
|
179
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
180
|
+
0.8.7.6 (ruby-1.9.3).
|
181
|
+
</div>
|
182
|
+
|
183
|
+
</body>
|
184
|
+
</html>
|