libastag 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. data/BUGS +10 -0
  2. data/CHANGES +8 -1
  3. data/MIT-LICENSE +2 -1
  4. data/README +7 -3
  5. data/Rakefile +3 -2
  6. data/TODO +4 -7
  7. data/doc/classes/Helpers.html +16 -20
  8. data/doc/classes/Helpers/REXML.html +4 -4
  9. data/doc/classes/Helpers/REXML/Attributes.html +10 -10
  10. data/doc/classes/Libastag.html +5 -5
  11. data/doc/classes/Libastag/Rabbit.html +56 -56
  12. data/doc/classes/Libastag/RabitEar.html +4 -4
  13. data/doc/classes/Libastag/RabitLed.html +4 -4
  14. data/doc/classes/Request.html +33 -37
  15. data/doc/classes/Request/Action.html +34 -34
  16. data/doc/classes/Request/AudioStream.html +313 -0
  17. data/doc/classes/Request/Base.html +13 -10
  18. data/doc/classes/Request/Base/Event.html +58 -23
  19. data/doc/classes/Request/Base/EventCollection.html +35 -32
  20. data/doc/classes/Request/Choregraphy.html +500 -0
  21. data/doc/classes/Request/Choregraphy/BadChorDesc.html +135 -0
  22. data/doc/classes/Request/Choregraphy/Ears.html +130 -0
  23. data/doc/classes/Request/Choregraphy/Ears/Directions.html +141 -0
  24. data/doc/classes/Request/Choregraphy/Ears/Positions.html +146 -0
  25. data/doc/classes/Request/Choregraphy/Leds.html +130 -0
  26. data/doc/classes/Request/Choregraphy/Leds/Colors.html +171 -0
  27. data/doc/classes/Request/Choregraphy/Leds/Positions.html +161 -0
  28. data/doc/classes/Request/GET_EARS_POSITION.html +17 -14
  29. data/doc/classes/Request/IdMessage.html +234 -0
  30. data/doc/classes/Request/Query.html +80 -55
  31. data/doc/classes/Request/SetEarsPosition.html +58 -36
  32. data/doc/classes/Request/TtsMessage.html +74 -50
  33. data/doc/classes/Response.html +55 -124
  34. data/doc/classes/Response/AbuseSending.html +34 -34
  35. data/doc/classes/Response/Base.html +34 -34
  36. data/doc/classes/Response/Base/BadServerRsp.html +34 -34
  37. data/doc/classes/Response/Base/GoodServerRsp.html +34 -34
  38. data/doc/classes/Response/Base/ServerRsp.html +53 -53
  39. data/doc/classes/Response/Blacklist.html +34 -34
  40. data/doc/classes/Response/ChorNotSend.html +34 -34
  41. data/doc/classes/Response/ChorSend.html +34 -34
  42. data/doc/classes/Response/CommandSend.html +34 -34
  43. data/doc/classes/Response/EarPositionNotSend.html +34 -34
  44. data/doc/classes/Response/EarPositionSend.html +34 -34
  45. data/doc/classes/Response/EmptyServerRsp.html +34 -34
  46. data/doc/classes/Response/LangListUser.html +34 -34
  47. data/doc/classes/Response/LinkPreview.html +34 -34
  48. data/doc/classes/Response/ListFriend.html +34 -34
  49. data/doc/classes/Response/ListReceivedMsg.html +34 -34
  50. data/doc/classes/Response/MessageNotSend.html +34 -34
  51. data/doc/classes/Response/MessageSend.html +34 -34
  52. data/doc/classes/Response/NabCastNotSend.html +34 -34
  53. data/doc/classes/Response/NabCastSend.html +34 -34
  54. data/doc/classes/Response/NoCorrectParameters.html +34 -34
  55. data/doc/classes/Response/NoGoodTokenOrSerial.html +34 -34
  56. data/doc/classes/Response/NotV2Rabbit.html +34 -34
  57. data/doc/classes/Response/PositionEar.html +34 -34
  58. data/doc/classes/Response/ProtocolExcepion.html +35 -35
  59. data/doc/classes/Response/RabbitName.html +34 -34
  60. data/doc/classes/Response/RabbitSleep.html +34 -34
  61. data/doc/classes/Response/RabbitVersion.html +34 -34
  62. data/doc/classes/Response/Signature.html +34 -34
  63. data/doc/classes/Response/Timezone.html +34 -34
  64. data/doc/classes/Response/TtsNotSend.html +34 -34
  65. data/doc/classes/Response/TtsSend.html +34 -34
  66. data/doc/classes/Response/VoiceListTts.html +34 -34
  67. data/doc/classes/Response/WebRadioNotSend.html +34 -34
  68. data/doc/classes/Response/WebRadioSend.html +34 -34
  69. data/doc/created.rid +1 -1
  70. data/doc/dot/f_0.png +0 -0
  71. data/doc/dot/f_5.dot +13 -445
  72. data/doc/dot/f_5.png +0 -0
  73. data/doc/dot/f_6.dot +445 -11
  74. data/doc/dot/f_6.png +0 -0
  75. data/doc/dot/f_7.dot +30 -5
  76. data/doc/dot/f_7.png +0 -0
  77. data/doc/dot/f_8.dot +39 -0
  78. data/doc/dot/f_8.png +0 -0
  79. data/doc/files/{lib/violet/violetapi_rb.html → BUGS.html} +17 -9
  80. data/doc/files/CHANGES.html +15 -2
  81. data/doc/files/MIT-LICENSE.html +2 -2
  82. data/doc/files/README.html +13 -3
  83. data/doc/files/TODO.html +5 -8
  84. data/doc/files/lib/libastag_rb.html +12 -10
  85. data/doc/files/lib/violet/helpers_rb.html +5 -5
  86. data/doc/files/lib/violet/request_rb.html +16 -12
  87. data/doc/files/lib/violet/response_rb.html +36 -35
  88. data/doc/fr_class_index.html +10 -1
  89. data/doc/fr_file_index.html +1 -1
  90. data/doc/fr_method_index.html +25 -12
  91. data/examples/morse.rb +72 -0
  92. data/lib/libastag.rb +6 -2
  93. data/lib/violet/helpers.rb +4 -2
  94. data/lib/violet/request.rb +501 -47
  95. data/lib/violet/response.rb +5 -2
  96. data/test/fake_violet_srv.rb +1 -1
  97. data/test/test_helpers.rb +3 -5
  98. data/test/{test_send.rb → test_query_and_actions.rb} +27 -10
  99. data/test/test_request_base.rb +76 -0
  100. data/test/test_request_chor.rb +162 -0
  101. data/test/test_request_stuff.rb +171 -0
  102. data/test/test_response.rb +3 -4
  103. metadata +45 -20
  104. data/doc/classes/VioletAPI.html +0 -118
  105. data/doc/dot/f_4.dot +0 -57
  106. data/doc/dot/f_4.png +0 -0
  107. data/lib/violet/violetapi.rb +0 -14
  108. data/test/test_request.rb +0 -20
@@ -81,16 +81,19 @@
81
81
  <div id="contextContent">
82
82
  <div id="diagram">
83
83
  <map id="map" name="map">
84
- <area shape="rect" coords="392,85,464,133" href="Base/Event.html" alt="Event" />
85
- <area shape="rect" coords="27,181,99,229" href="Action.html" alt="Action" />
86
- <area shape="rect" coords="123,181,211,229" href="TtsMessage.html" alt="TtsMessage" />
87
- <area shape="rect" coords="235,181,341,229" href="SetEarsPosition.html" alt="SetEarsPosition" />
88
- <area shape="rect" coords="365,181,469,229" href="Base/EventCollection.html" alt="EventCollection" />
89
- <area shape="rect" coords="647,85,724,133" href="../Enumerable.html" alt="Enumerable" />
90
- <area shape="rect" coords="135,85,207,133" href="Query.html" alt="Query" />
91
- <area shape="rect" coords="491,73,625,121" href="GET_EARS_POSITION.html" alt="GET_EARS_POSITION" />
92
- <area shape="rect" coords="355,51,480,240" href="Base.html" alt="Base" />
93
- <area shape="rect" coords="16,16,636,251" href="../Request.html" alt="Request" />
84
+ <area shape="rect" coords="736,86,808,134" href="Base/Event.html" alt="Event" />
85
+ <area shape="rect" coords="27,182,99,230" href="Action.html" alt="Action" />
86
+ <area shape="rect" coords="123,182,216,230" href="AudioStream.html" alt="AudioStream" />
87
+ <area shape="rect" coords="240,182,333,230" href="Choregraphy.html" alt="Choregraphy" />
88
+ <area shape="rect" coords="357,182,448,230" href="TtsMessage.html" alt="TtsMessage" />
89
+ <area shape="rect" coords="472,182,555,230" href="IdMessage.html" alt="IdMessage" />
90
+ <area shape="rect" coords="579,182,685,230" href="SetEarsPosition.html" alt="SetEarsPosition" />
91
+ <area shape="rect" coords="709,182,813,230" href="Base/EventCollection.html" alt="EventCollection" />
92
+ <area shape="rect" coords="984,86,1061,134" href="../Enumerable.html" alt="Enumerable" />
93
+ <area shape="rect" coords="307,86,379,134" href="Query.html" alt="Query" />
94
+ <area shape="rect" coords="835,74,963,122" href="GET_EARS_POSITION.html" alt="GET_EARS_POSITION" />
95
+ <area shape="rect" coords="699,51,824,240" href="Base.html" alt="Base" />
96
+ <area shape="rect" coords="16,16,973,251" href="../Request.html" alt="Request" />
94
97
  </map>
95
98
  <img src="../../dot/f_8.png" usemap="#map" border="0" alt="dot/f_8.png">
96
99
  </div>
@@ -120,8 +123,8 @@ href="http://api.nabaztag.com/docs/home.html#getinfo">api.nabaztag.com/docs/home
120
123
  <h3 class="section-bar">Methods</h3>
121
124
 
122
125
  <div class="name-list">
123
- <a href="#M000022">new</a>&nbsp;&nbsp;
124
- <a href="#M000023">to_url</a>&nbsp;&nbsp;
126
+ <a href="#M000023">new</a>&nbsp;&nbsp;
127
+ <a href="#M000024">to_url</a>&nbsp;&nbsp;
125
128
  </div>
126
129
  </div>
127
130
 
@@ -143,28 +146,28 @@ href="http://api.nabaztag.com/docs/home.html#getinfo">api.nabaztag.com/docs/home
143
146
  <div id="methods">
144
147
  <h3 class="section-bar">Public Class methods</h3>
145
148
 
146
- <div id="method-M000022" class="method-detail">
147
- <a name="M000022"></a>
149
+ <div id="method-M000023" class="method-detail">
150
+ <a name="M000023"></a>
148
151
 
149
152
  <div class="method-heading">
150
- <a href="#M000022" class="method-signature">
153
+ <a href="#M000023" class="method-signature">
151
154
  <span class="method-name">new</span><span class="method-args">(id)</span>
152
155
  </a>
153
156
  </div>
154
157
 
155
158
  <div class="method-description">
156
159
  <p>
157
- create a <a href="Action.html#M000022">new</a> <a
160
+ create a <a href="Action.html#M000023">new</a> <a
158
161
  href="Action.html">Action</a> with <tt>id</tt>
159
162
  </p>
160
163
  <p><a class="source-toggle" href="#"
161
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
162
- <div class="method-source-code" id="M000022-source">
164
+ onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
165
+ <div class="method-source-code" id="M000023-source">
163
166
  <pre>
164
- <span class="ruby-comment cmt"># File lib/violet/request.rb, line 181</span>
165
- 181: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">id</span>
166
- 182: <span class="ruby-ivar">@id</span> = <span class="ruby-identifier">id</span>
167
- 183: <span class="ruby-keyword kw">end</span>
167
+ <span class="ruby-comment cmt"># File lib/violet/request.rb, line 635</span>
168
+ 635: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">id</span>
169
+ 636: <span class="ruby-ivar">@id</span> = <span class="ruby-identifier">id</span>
170
+ 637: <span class="ruby-keyword kw">end</span>
168
171
  </pre>
169
172
  </div>
170
173
  </div>
@@ -172,27 +175,24 @@ href="Action.html">Action</a> with <tt>id</tt>
172
175
 
173
176
  <h3 class="section-bar">Public Instance methods</h3>
174
177
 
175
- <div id="method-M000023" class="method-detail">
176
- <a name="M000023"></a>
178
+ <div id="method-M000024" class="method-detail">
179
+ <a name="M000024"></a>
177
180
 
178
181
  <div class="method-heading">
179
- <a href="#M000023" class="method-signature">
182
+ <a href="#M000024" class="method-signature">
180
183
  <span class="method-name">to_url</span><span class="method-args">()</span>
181
184
  </a>
182
185
  </div>
183
186
 
184
187
  <div class="method-description">
185
- <p>
186
- <a href="Action.html">Action</a> have only action= option.
187
- </p>
188
188
  <p><a class="source-toggle" href="#"
189
- onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
190
- <div class="method-source-code" id="M000023-source">
189
+ onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
190
+ <div class="method-source-code" id="M000024-source">
191
191
  <pre>
192
- <span class="ruby-comment cmt"># File lib/violet/request.rb, line 186</span>
193
- 186: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_url</span>
194
- 187: <span class="ruby-node">&quot;action=#{@id}&quot;</span>
195
- 188: <span class="ruby-keyword kw">end</span>
192
+ <span class="ruby-comment cmt"># File lib/violet/request.rb, line 639</span>
193
+ 639: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_url</span>
194
+ 640: <span class="ruby-node">&quot;action=#{@id}&quot;</span>
195
+ 641: <span class="ruby-keyword kw">end</span>
196
196
  </pre>
197
197
  </div>
198
198
  </div>
@@ -0,0 +1,313 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Request::AudioStream</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Request::AudioStream</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/violet/request_rb.html">
59
+ lib/violet/request.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="Base/Event.html">
69
+ Base::Event
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+ <div id="diagram">
83
+ <map id="map" name="map">
84
+ <area shape="rect" coords="736,86,808,134" href="Base/Event.html" alt="Event" />
85
+ <area shape="rect" coords="27,182,99,230" href="Action.html" alt="Action" />
86
+ <area shape="rect" coords="123,182,216,230" href="AudioStream.html" alt="AudioStream" />
87
+ <area shape="rect" coords="240,182,333,230" href="Choregraphy.html" alt="Choregraphy" />
88
+ <area shape="rect" coords="357,182,448,230" href="TtsMessage.html" alt="TtsMessage" />
89
+ <area shape="rect" coords="472,182,555,230" href="IdMessage.html" alt="IdMessage" />
90
+ <area shape="rect" coords="579,182,685,230" href="SetEarsPosition.html" alt="SetEarsPosition" />
91
+ <area shape="rect" coords="709,182,813,230" href="Base/EventCollection.html" alt="EventCollection" />
92
+ <area shape="rect" coords="984,86,1061,134" href="../Enumerable.html" alt="Enumerable" />
93
+ <area shape="rect" coords="307,86,379,134" href="Query.html" alt="Query" />
94
+ <area shape="rect" coords="835,74,963,122" href="GET_EARS_POSITION.html" alt="GET_EARS_POSITION" />
95
+ <area shape="rect" coords="699,51,824,240" href="Base.html" alt="Base" />
96
+ <area shape="rect" coords="16,16,973,251" href="../Request.html" alt="Request" />
97
+ </map>
98
+ <img src="../../dot/f_8.png" usemap="#map" border="0" alt="dot/f_8.png">
99
+ </div>
100
+
101
+ <div id="description">
102
+ <p>
103
+ <a href="AudioStream.html">AudioStream</a> events are used with MP3
104
+ hyperlinks to make your rabbit play podcasts or webradio. Your rabbit has
105
+ to be a tag/tag to use <a href="AudioStream.html">AudioStream</a> events
106
+ (it should be checked at higher level, this class won&#8216;t do that for
107
+ you :))
108
+ </p>
109
+ <p>
110
+ see <a
111
+ href="http://api.nabaztag.com/docs/home.html#sendurl">api.nabaztag.com/docs/home.html#sendurl</a>
112
+ </p>
113
+ <h1>Examples</h1>
114
+ <p>
115
+ you can give a String argument, or an Array of String if you want to play
116
+ several urls, or a Hash with a <tt>:url_list</tt> key.
117
+ </p>
118
+ <pre>
119
+ AudioStream.new &quot;http://my_streamed_url.com&quot; # =&gt; #&lt;Request::AudioStream:0x2b44fafd52e0 @args=[&quot;http://my_streamed_url.com&quot;]&gt;
120
+ AudioStream.new :url_list =&gt; &quot;http://my_streamed_url.com&quot; # =&gt; #&lt;Request::AudioStream:0x2b52a24acf70 @args=[&quot;http://my_streamed_url.com&quot;]&gt;
121
+
122
+ AudioStream.new &quot;http://my_streamed_url.com&quot;, &quot;http://plop.test&quot; # =&gt; #&lt;Request::AudioStream:0x2b44fafc9058 @args=[&quot;http://my_streamed_url.com&quot;, &quot;http://plop.test&quot;]&gt;
123
+ AudioStream.new [&quot;http://my_streamed_url.com&quot;, &quot;http://plop.test&quot;] # =&gt; #&lt;Request::AudioStream:0x2b44fafbdc30 @args=[&quot;http://my_streamed_url.com&quot;, &quot;http://plop.test&quot;]&gt;
124
+ AudioStream.new :url_list =&gt; [&quot;http://my_streamed_url.com&quot;, &quot;http://plop.test&quot;] # =&gt; #&lt;Request::AudioStream:0x2b52a24a28e0 @args=[&quot;http://my_streamed_url.com&quot;, &quot;http://plop.test&quot;]&gt;
125
+ </pre>
126
+
127
+ </div>
128
+
129
+
130
+ </div>
131
+
132
+ <div id="method-list">
133
+ <h3 class="section-bar">Methods</h3>
134
+
135
+ <div class="name-list">
136
+ <a href="#M000027">+</a>&nbsp;&nbsp;
137
+ <a href="#M000028">==</a>&nbsp;&nbsp;
138
+ <a href="#M000025">new</a>&nbsp;&nbsp;
139
+ <a href="#M000026">to_url</a>&nbsp;&nbsp;
140
+ </div>
141
+ </div>
142
+
143
+ </div>
144
+
145
+
146
+ <!-- if includes -->
147
+
148
+ <div id="section">
149
+
150
+
151
+
152
+
153
+
154
+ <div id="attribute-list">
155
+ <h3 class="section-bar">Attributes</h3>
156
+
157
+ <div class="name-list">
158
+ <table>
159
+ <tr class="top-aligned-row context-row">
160
+ <td class="context-item-name">url_list</td>
161
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
162
+ <td class="context-item-desc"></td>
163
+ </tr>
164
+ </table>
165
+ </div>
166
+ </div>
167
+
168
+
169
+
170
+ <!-- if method_list -->
171
+ <div id="methods">
172
+ <h3 class="section-bar">Public Class methods</h3>
173
+
174
+ <div id="method-M000025" class="method-detail">
175
+ <a name="M000025"></a>
176
+
177
+ <div class="method-heading">
178
+ <a href="#M000025" class="method-signature">
179
+ <span class="method-name">new</span><span class="method-args">(*args)</span>
180
+ </a>
181
+ </div>
182
+
183
+ <div class="method-description">
184
+ <p>
185
+ take an Array of String or many Strings arguments, each String is a URL to
186
+ play. Another way to create <a href="AudioStream.html">AudioStream</a> is
187
+ to give a Hash in argument, with the <tt>:url_list</tt> keys that contains
188
+ an Array of Strings or a String. see examples.
189
+ </p>
190
+ <p><a class="source-toggle" href="#"
191
+ onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
192
+ <div class="method-source-code" id="M000025-source">
193
+ <pre>
194
+ <span class="ruby-comment cmt"># File lib/violet/request.rb, line 264</span>
195
+ 264: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
196
+ 265: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'no args given'</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">empty?</span>
197
+ 266: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
198
+ 267: <span class="ruby-identifier">args</span> = [ <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span>[<span class="ruby-identifier">:url_list</span>] ]
199
+ 268: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'empty :url_list key in Hash argument'</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">empty?</span>
200
+ 269: <span class="ruby-keyword kw">end</span>
201
+ 270:
202
+ 271: <span class="ruby-ivar">@url_list</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">flatten</span>
203
+ 272: <span class="ruby-keyword kw">end</span>
204
+ </pre>
205
+ </div>
206
+ </div>
207
+ </div>
208
+
209
+ <h3 class="section-bar">Public Instance methods</h3>
210
+
211
+ <div id="method-M000027" class="method-detail">
212
+ <a name="M000027"></a>
213
+
214
+ <div class="method-heading">
215
+ <a href="#M000027" class="method-signature">
216
+ <span class="method-name">+</span><span class="method-args">(other)</span>
217
+ </a>
218
+ </div>
219
+
220
+ <div class="method-description">
221
+ <p>
222
+ <a href="AudioStream.html">AudioStream</a> object can be added with other
223
+ <a href="AudioStream.html">AudioStream</a> objects. When you add first to
224
+ second, the <a href="AudioStream.html#M000025">new</a> <a
225
+ href="AudioStream.html">AudioStream</a> will play all the urls in first,
226
+ then all the urls in second.
227
+ </p>
228
+ <h2>Examples</h2>
229
+ <pre>
230
+ one = AudioStream.new &quot;http://www.one.com&quot; # =&gt; #&lt;Request::AudioStream:0x2b2d075e0b28 @url_list=[&quot;http://www.one.com&quot;]&gt;
231
+ two = AudioStream.new &quot;http://www.two.com&quot; # =&gt; #&lt;Request::AudioStream:0x2b2d075db510 @url_list=[&quot;http://www.two.com&quot;]&gt;
232
+ onetwo = one + two # =&gt; #&lt;Request::AudioStream:0x2b2d075d7a78 @url_list=[&quot;http://www.one.com&quot;, &quot;http://www.two.com&quot;]&gt;
233
+ twoone = two + one # =&gt; #&lt;Request::AudioStream:0x2b2d075cff80 @url_list=[&quot;http://www.two.com&quot;, &quot;http://www.one.com&quot;]&gt;
234
+ </pre>
235
+ <p><a class="source-toggle" href="#"
236
+ onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
237
+ <div class="method-source-code" id="M000027-source">
238
+ <pre>
239
+ <span class="ruby-comment cmt"># File lib/violet/request.rb, line 286</span>
240
+ 286: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">other</span>
241
+ 287: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;#{other.inspect} is not a Streamed Event&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">streamed?</span>
242
+ 288: <span class="ruby-constant">AudioStream</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">url_list</span>, <span class="ruby-identifier">other</span>.<span class="ruby-identifier">url_list</span>)
243
+ 289: <span class="ruby-keyword kw">end</span>
244
+ </pre>
245
+ </div>
246
+ </div>
247
+ </div>
248
+
249
+ <div id="method-M000028" class="method-detail">
250
+ <a name="M000028"></a>
251
+
252
+ <div class="method-heading">
253
+ <a href="#M000028" class="method-signature">
254
+ <span class="method-name">==</span><span class="method-args">(other)</span>
255
+ </a>
256
+ </div>
257
+
258
+ <div class="method-description">
259
+ <p>
260
+ compare two <a href="AudioStream.html">AudioStream</a>. <a
261
+ href="AudioStream.html">AudioStream</a> are equals if and only if they have
262
+ the same url list.
263
+ </p>
264
+ <p><a class="source-toggle" href="#"
265
+ onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
266
+ <div class="method-source-code" id="M000028-source">
267
+ <pre>
268
+ <span class="ruby-comment cmt"># File lib/violet/request.rb, line 292</span>
269
+ 292: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>
270
+ 293: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;#{other.inspect} is not a Streamed Event&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">streamed?</span>
271
+ 294: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">url_list</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">url_list</span>
272
+ 295: <span class="ruby-keyword kw">end</span>
273
+ </pre>
274
+ </div>
275
+ </div>
276
+ </div>
277
+
278
+ <div id="method-M000026" class="method-detail">
279
+ <a name="M000026"></a>
280
+
281
+ <div class="method-heading">
282
+ <a href="#M000026" class="method-signature">
283
+ <span class="method-name">to_url</span><span class="method-args">()</span>
284
+ </a>
285
+ </div>
286
+
287
+ <div class="method-description">
288
+ <p><a class="source-toggle" href="#"
289
+ onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
290
+ <div class="method-source-code" id="M000026-source">
291
+ <pre>
292
+ <span class="ruby-comment cmt"># File lib/violet/request.rb, line 274</span>
293
+ 274: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_url</span>
294
+ 275: <span class="ruby-node">&quot;urlList=#{@url_list.join('|')}&quot;</span>
295
+ 276: <span class="ruby-keyword kw">end</span>
296
+ </pre>
297
+ </div>
298
+ </div>
299
+ </div>
300
+
301
+
302
+ </div>
303
+
304
+
305
+ </div>
306
+
307
+
308
+ <div id="validator-badges">
309
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
310
+ </div>
311
+
312
+ </body>
313
+ </html>
@@ -73,16 +73,19 @@
73
73
  <div id="contextContent">
74
74
  <div id="diagram">
75
75
  <map id="map" name="map">
76
- <area shape="rect" coords="392,85,464,133" href="Base/Event.html" alt="Event" />
77
- <area shape="rect" coords="27,181,99,229" href="Action.html" alt="Action" />
78
- <area shape="rect" coords="123,181,211,229" href="TtsMessage.html" alt="TtsMessage" />
79
- <area shape="rect" coords="235,181,341,229" href="SetEarsPosition.html" alt="SetEarsPosition" />
80
- <area shape="rect" coords="365,181,469,229" href="Base/EventCollection.html" alt="EventCollection" />
81
- <area shape="rect" coords="647,85,724,133" href="../Enumerable.html" alt="Enumerable" />
82
- <area shape="rect" coords="135,85,207,133" href="Query.html" alt="Query" />
83
- <area shape="rect" coords="491,73,625,121" href="GET_EARS_POSITION.html" alt="GET_EARS_POSITION" />
84
- <area shape="rect" coords="355,51,480,240" href="Base.html" alt="Base" />
85
- <area shape="rect" coords="16,16,636,251" href="../Request.html" alt="Request" />
76
+ <area shape="rect" coords="736,86,808,134" href="Base/Event.html" alt="Event" />
77
+ <area shape="rect" coords="27,182,99,230" href="Action.html" alt="Action" />
78
+ <area shape="rect" coords="123,182,216,230" href="AudioStream.html" alt="AudioStream" />
79
+ <area shape="rect" coords="240,182,333,230" href="Choregraphy.html" alt="Choregraphy" />
80
+ <area shape="rect" coords="357,182,448,230" href="TtsMessage.html" alt="TtsMessage" />
81
+ <area shape="rect" coords="472,182,555,230" href="IdMessage.html" alt="IdMessage" />
82
+ <area shape="rect" coords="579,182,685,230" href="SetEarsPosition.html" alt="SetEarsPosition" />
83
+ <area shape="rect" coords="709,182,813,230" href="Base/EventCollection.html" alt="EventCollection" />
84
+ <area shape="rect" coords="984,86,1061,134" href="../Enumerable.html" alt="Enumerable" />
85
+ <area shape="rect" coords="307,86,379,134" href="Query.html" alt="Query" />
86
+ <area shape="rect" coords="835,74,963,122" href="GET_EARS_POSITION.html" alt="GET_EARS_POSITION" />
87
+ <area shape="rect" coords="699,51,824,240" href="Base.html" alt="Base" />
88
+ <area shape="rect" coords="16,16,973,251" href="../Request.html" alt="Request" />
86
89
  </map>
87
90
  <img src="../../dot/f_8.png" usemap="#map" border="0" alt="dot/f_8.png">
88
91
  </div>