libastag 0.0.1
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.
- data/CHANGES +7 -0
- data/MIT-LICENSE +19 -0
- data/README +65 -0
- data/Rakefile +276 -0
- data/TODO +7 -0
- data/doc/classes/Helpers/REXML/Attributes.html +179 -0
- data/doc/classes/Helpers/REXML.html +115 -0
- data/doc/classes/Helpers.html +181 -0
- data/doc/classes/Libastag/Rabbit.html +462 -0
- data/doc/classes/Libastag/RabitEar.html +120 -0
- data/doc/classes/Libastag/RabitLed.html +120 -0
- data/doc/classes/Libastag.html +141 -0
- data/doc/classes/Request/Action.html +213 -0
- data/doc/classes/Request/Base/Event.html +226 -0
- data/doc/classes/Request/Base/EventCollection.html +246 -0
- data/doc/classes/Request/Base.html +134 -0
- data/doc/classes/Request/GET_EARS_POSITION.html +151 -0
- data/doc/classes/Request/Query.html +244 -0
- data/doc/classes/Request/SetEarsPosition.html +213 -0
- data/doc/classes/Request/TtsMessage.html +235 -0
- data/doc/classes/Request.html +414 -0
- data/doc/classes/Response/AbuseSending.html +165 -0
- data/doc/classes/Response/Base/BadServerRsp.html +163 -0
- data/doc/classes/Response/Base/GoodServerRsp.html +161 -0
- data/doc/classes/Response/Base/ServerRsp.html +347 -0
- data/doc/classes/Response/Base.html +162 -0
- data/doc/classes/Response/Blacklist.html +165 -0
- data/doc/classes/Response/ChorNotSend.html +166 -0
- data/doc/classes/Response/ChorSend.html +165 -0
- data/doc/classes/Response/CommandSend.html +168 -0
- data/doc/classes/Response/EarPositionNotSend.html +165 -0
- data/doc/classes/Response/EarPositionSend.html +165 -0
- data/doc/classes/Response/EmptyServerRsp.html +161 -0
- data/doc/classes/Response/LangListUser.html +166 -0
- data/doc/classes/Response/LinkPreview.html +165 -0
- data/doc/classes/Response/ListFriend.html +165 -0
- data/doc/classes/Response/ListReceivedMsg.html +165 -0
- data/doc/classes/Response/MessageNotSend.html +165 -0
- data/doc/classes/Response/MessageSend.html +165 -0
- data/doc/classes/Response/NabCastNotSend.html +169 -0
- data/doc/classes/Response/NabCastSend.html +165 -0
- data/doc/classes/Response/NoCorrectParameters.html +165 -0
- data/doc/classes/Response/NoGoodTokenOrSerial.html +165 -0
- data/doc/classes/Response/NotV2Rabbit.html +165 -0
- data/doc/classes/Response/PositionEar.html +166 -0
- data/doc/classes/Response/ProtocolExcepion.html +164 -0
- data/doc/classes/Response/RabbitName.html +164 -0
- data/doc/classes/Response/RabbitSleep.html +164 -0
- data/doc/classes/Response/RabbitVersion.html +164 -0
- data/doc/classes/Response/Signature.html +164 -0
- data/doc/classes/Response/Timezone.html +164 -0
- data/doc/classes/Response/TtsNotSend.html +168 -0
- data/doc/classes/Response/TtsSend.html +165 -0
- data/doc/classes/Response/VoiceListTts.html +165 -0
- data/doc/classes/Response/WebRadioNotSend.html +165 -0
- data/doc/classes/Response/WebRadioSend.html +165 -0
- data/doc/classes/Response.html +337 -0
- data/doc/classes/VioletAPI.html +118 -0
- data/doc/created.rid +1 -0
- data/doc/dot/f_0.dot +14 -0
- data/doc/dot/f_0.png +0 -0
- data/doc/dot/f_4.dot +57 -0
- data/doc/dot/f_4.png +0 -0
- data/doc/dot/f_5.dot +489 -0
- data/doc/dot/f_5.png +0 -0
- data/doc/dot/f_6.dot +55 -0
- data/doc/dot/f_6.png +0 -0
- data/doc/dot/f_7.dot +30 -0
- data/doc/dot/f_7.png +0 -0
- data/doc/dot/f_8.dot +142 -0
- data/doc/dot/f_8.png +0 -0
- data/doc/files/CHANGES.html +126 -0
- data/doc/files/MIT-LICENSE.html +134 -0
- data/doc/files/README.html +192 -0
- data/doc/files/TODO.html +126 -0
- data/doc/files/lib/libastag_rb.html +116 -0
- data/doc/files/lib/violet/helpers_rb.html +123 -0
- data/doc/files/lib/violet/request_rb.html +133 -0
- data/doc/files/lib/violet/response_rb.html +220 -0
- data/doc/files/lib/violet/violetapi_rb.html +114 -0
- data/doc/fr_class_index.html +79 -0
- data/doc/fr_file_index.html +35 -0
- data/doc/fr_method_index.html +56 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/libastag.rb +116 -0
- data/lib/violet/helpers.rb +48 -0
- data/lib/violet/request.rb +301 -0
- data/lib/violet/response.rb +412 -0
- data/lib/violet/violetapi.rb +14 -0
- data/test/fake_violet_srv.rb +94 -0
- data/test/test_helpers.rb +31 -0
- data/test/test_request.rb +20 -0
- data/test/test_response.rb +295 -0
- data/test/test_send.rb +137 -0
- metadata +264 -0
|
@@ -0,0 +1,347 @@
|
|
|
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: Response::Base::ServerRsp</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">Response::Base::ServerRsp</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../../files/lib/violet/response_rb.html">
|
|
59
|
+
lib/violet/response.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
|
+
Object
|
|
69
|
+
</td>
|
|
70
|
+
</tr>
|
|
71
|
+
</table>
|
|
72
|
+
</div>
|
|
73
|
+
<!-- banner header -->
|
|
74
|
+
|
|
75
|
+
<div id="bodyContent">
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<div id="contextContent">
|
|
80
|
+
<div id="diagram">
|
|
81
|
+
<map id="map" name="map">
|
|
82
|
+
<area shape="rect" coords="1625,229,1732,277" href="GoodServerRsp.html" alt="GoodServerRsp" />
|
|
83
|
+
<area shape="rect" coords="27,325,136,373" href="../EarPositionSend.html" alt="EarPositionSend" />
|
|
84
|
+
<area shape="rect" coords="160,325,256,373" href="../NabCastSend.html" alt="NabCastSend" />
|
|
85
|
+
<area shape="rect" coords="280,325,384,373" href="../CommandSend.html" alt="CommandSend" />
|
|
86
|
+
<area shape="rect" coords="408,325,485,373" href="../Signature.html" alt="Signature" />
|
|
87
|
+
<area shape="rect" coords="509,325,595,373" href="../PositionEar.html" alt="PositionEar" />
|
|
88
|
+
<area shape="rect" coords="619,325,707,373" href="../VoiceListTts.html" alt="VoiceListTts" />
|
|
89
|
+
<area shape="rect" coords="731,325,819,373" href="../LinkPreview.html" alt="LinkPreview" />
|
|
90
|
+
<area shape="rect" coords="843,325,941,373" href="../MessageSend.html" alt="MessageSend" />
|
|
91
|
+
<area shape="rect" coords="965,325,1059,373" href="../LangListUser.html" alt="LangListUser" />
|
|
92
|
+
<area shape="rect" coords="1083,325,1173,373" href="../RabbitName.html" alt="RabbitName" />
|
|
93
|
+
<area shape="rect" coords="1197,325,1269,373" href="../TtsSend.html" alt="TtsSend" />
|
|
94
|
+
<area shape="rect" coords="1293,325,1405,373" href="../ListReceivedMsg.html" alt="ListReceivedMsg" />
|
|
95
|
+
<area shape="rect" coords="1429,325,1507,373" href="../ListFriend.html" alt="ListFriend" />
|
|
96
|
+
<area shape="rect" coords="1531,325,1619,373" href="../RabbitSleep.html" alt="RabbitSleep" />
|
|
97
|
+
<area shape="rect" coords="1643,325,1715,373" href="../Blacklist.html" alt="Blacklist" />
|
|
98
|
+
<area shape="rect" coords="1739,325,1816,373" href="../Timezone.html" alt="Timezone" />
|
|
99
|
+
<area shape="rect" coords="1840,325,1939,373" href="../RabbitVersion.html" alt="RabbitVersion" />
|
|
100
|
+
<area shape="rect" coords="1963,325,2067,373" href="../WebRadioSend.html" alt="WebRadioSend" />
|
|
101
|
+
<area shape="rect" coords="2091,325,2168,373" href="../ChorSend.html" alt="ChorSend" />
|
|
102
|
+
<area shape="rect" coords="1756,229,1855,277" href="BadServerRsp.html" alt="BadServerRsp" />
|
|
103
|
+
<area shape="rect" coords="2192,325,2331,373" href="../NoGoodTokenOrSerial.html" alt="NoGoodTokenOrSerial" />
|
|
104
|
+
<area shape="rect" coords="2355,325,2451,373" href="../ChorNotSend.html" alt="ChorNotSend" />
|
|
105
|
+
<area shape="rect" coords="2475,325,2589,373" href="../NabCastNotSend.html" alt="NabCastNotSend" />
|
|
106
|
+
<area shape="rect" coords="2613,325,2728,373" href="../MessageNotSend.html" alt="MessageNotSend" />
|
|
107
|
+
<area shape="rect" coords="2752,325,2851,373" href="../AbuseSending.html" alt="AbuseSending" />
|
|
108
|
+
<area shape="rect" coords="2875,325,3008,373" href="../NoCorrectParameters.html" alt="NoCorrectParameters" />
|
|
109
|
+
<area shape="rect" coords="3032,325,3120,373" href="../TtsNotSend.html" alt="TtsNotSend" />
|
|
110
|
+
<area shape="rect" coords="3144,325,3235,373" href="../NotV2Rabbit.html" alt="NotV2Rabbit" />
|
|
111
|
+
<area shape="rect" coords="3259,325,3381,373" href="../WebRadioNotSend.html" alt="WebRadioNotSend" />
|
|
112
|
+
<area shape="rect" coords="3405,325,3531,373" href="../EarPositionNotSend.html" alt="EarPositionNotSend" />
|
|
113
|
+
<area shape="rect" coords="1149,5,1227,53" href="../../Exception.html" alt="Exception" />
|
|
114
|
+
<area shape="rect" coords="1131,133,1245,181" href="../ProtocolExcepion.html" alt="ProtocolExcepion" />
|
|
115
|
+
<area shape="rect" coords="1765,133,1845,181" href="ServerRsp.html" alt="ServerRsp" />
|
|
116
|
+
<area shape="rect" coords="1879,229,1991,277" href="../EmptyServerRsp.html" alt="EmptyServerRsp" />
|
|
117
|
+
<area shape="rect" coords="1615,99,1865,288" href="../Base.html" alt="Base" />
|
|
118
|
+
<area shape="rect" coords="16,64,3541,384" href="../../Response.html" alt="Response" />
|
|
119
|
+
</map>
|
|
120
|
+
<img src="../../../dot/f_5.png" usemap="#map" border="0" alt="dot/f_5.png">
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div id="description">
|
|
124
|
+
<p>
|
|
125
|
+
base class used to handle Violet server‘s responses.
|
|
126
|
+
</p>
|
|
127
|
+
<p>
|
|
128
|
+
We want to access to all xml elements easily, like the powerful
|
|
129
|
+
ActiveRecord ‘find’ function. This class provide virtual
|
|
130
|
+
accessor and predicate for elements. If you have a <a
|
|
131
|
+
href="ServerRsp.html">ServerRsp</a>, rsp.has_message? will return
|
|
132
|
+
<tt>true</tt> if rsp has a ‘message’ element, and
|
|
133
|
+
rsp.has_many_messages? will return <tt>true</tt> if rsp has more than one
|
|
134
|
+
‘message’ element. rsp.message will return the first message
|
|
135
|
+
element and rsp.messages will return an Array that contains all message
|
|
136
|
+
elements of rsp (see doc of <a href="../../Response.html">Response</a>
|
|
137
|
+
module for examples).
|
|
138
|
+
</p>
|
|
139
|
+
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<div id="method-list">
|
|
146
|
+
<h3 class="section-bar">Methods</h3>
|
|
147
|
+
|
|
148
|
+
<div class="name-list">
|
|
149
|
+
<a href="#M000006">bad?</a>
|
|
150
|
+
<a href="#M000007">get_all</a>
|
|
151
|
+
<a href="#M000005">good?</a>
|
|
152
|
+
<a href="#M000004">new</a>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<!-- if includes -->
|
|
160
|
+
|
|
161
|
+
<div id="section">
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<div id="attribute-list">
|
|
168
|
+
<h3 class="section-bar">Attributes</h3>
|
|
169
|
+
|
|
170
|
+
<div class="name-list">
|
|
171
|
+
<table>
|
|
172
|
+
<tr class="top-aligned-row context-row">
|
|
173
|
+
<td class="context-item-name">xml</td>
|
|
174
|
+
<td class="context-item-value"> [R] </td>
|
|
175
|
+
<td class="context-item-desc">
|
|
176
|
+
It‘s possible to access the REXML::Document object if needed, but try
|
|
177
|
+
to use virtual accessors and <a href="ServerRsp.html#M000007">get_all</a>
|
|
178
|
+
if possible.
|
|
179
|
+
|
|
180
|
+
</td>
|
|
181
|
+
</tr>
|
|
182
|
+
</table>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
<!-- if method_list -->
|
|
189
|
+
<div id="methods">
|
|
190
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
191
|
+
|
|
192
|
+
<div id="method-M000004" class="method-detail">
|
|
193
|
+
<a name="M000004"></a>
|
|
194
|
+
|
|
195
|
+
<div class="method-heading">
|
|
196
|
+
<a href="#M000004" class="method-signature">
|
|
197
|
+
<span class="method-name">new</span><span class="method-args">(raw)</span>
|
|
198
|
+
</a>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
<div class="method-description">
|
|
202
|
+
<p>
|
|
203
|
+
create a <a href="ServerRsp.html">ServerRsp</a> with the raw argument. raw
|
|
204
|
+
must be the xml text of the server‘s response. if the xml is
|
|
205
|
+
malformed, a REXML::ParseException will be raised.
|
|
206
|
+
</p>
|
|
207
|
+
<p><a class="source-toggle" href="#"
|
|
208
|
+
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
|
209
|
+
<div class="method-source-code" id="M000004-source">
|
|
210
|
+
<pre>
|
|
211
|
+
<span class="ruby-comment cmt"># File lib/violet/response.rb, line 74</span>
|
|
212
|
+
74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">raw</span>
|
|
213
|
+
75: <span class="ruby-ivar">@xml</span> = <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">raw</span>
|
|
214
|
+
76: <span class="ruby-keyword kw">end</span>
|
|
215
|
+
</pre>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
221
|
+
|
|
222
|
+
<div id="method-M000006" class="method-detail">
|
|
223
|
+
<a name="M000006"></a>
|
|
224
|
+
|
|
225
|
+
<div class="method-heading">
|
|
226
|
+
<a href="#M000006" class="method-signature">
|
|
227
|
+
<span class="method-name">bad?</span><span class="method-args">()</span>
|
|
228
|
+
</a>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
<div class="method-description">
|
|
232
|
+
<p>
|
|
233
|
+
return <tt>true</tt> if the response is an error, <tt>false</tt>
|
|
234
|
+
otherwhise.
|
|
235
|
+
</p>
|
|
236
|
+
<p><a class="source-toggle" href="#"
|
|
237
|
+
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
|
238
|
+
<div class="method-source-code" id="M000006-source">
|
|
239
|
+
<pre>
|
|
240
|
+
<span class="ruby-comment cmt"># File lib/violet/response.rb, line 88</span>
|
|
241
|
+
88: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bad?</span>
|
|
242
|
+
89: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">BadServerRsp</span>
|
|
243
|
+
90: <span class="ruby-keyword kw">end</span>
|
|
244
|
+
</pre>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<div id="method-M000007" class="method-detail">
|
|
250
|
+
<a name="M000007"></a>
|
|
251
|
+
|
|
252
|
+
<div class="method-heading">
|
|
253
|
+
<a href="#M000007" class="method-signature">
|
|
254
|
+
<span class="method-name">get_all</span><span class="method-args">(name) {|e| ...}</span>
|
|
255
|
+
</a>
|
|
256
|
+
</div>
|
|
257
|
+
|
|
258
|
+
<div class="method-description">
|
|
259
|
+
<h2>Summary</h2>
|
|
260
|
+
<p>
|
|
261
|
+
get all xml‘s element that match name.
|
|
262
|
+
</p>
|
|
263
|
+
<h2>Arguments</h2>
|
|
264
|
+
<p>
|
|
265
|
+
name : name of the element you want to fetch (see examples) block : a block
|
|
266
|
+
of code that take a REXML::Element in parameter. if no block is given, it
|
|
267
|
+
return an Array of REXML::Element.
|
|
268
|
+
</p>
|
|
269
|
+
<h2>Examples</h2>
|
|
270
|
+
<p>
|
|
271
|
+
<b>Side effect</b>
|
|
272
|
+
</p>
|
|
273
|
+
<pre>
|
|
274
|
+
>> rsp = Response.parse('<?xml version="1.0" encoding="UTF-8"?><rsp><langListUser nb="4"/><myLang lang="fr"/><myLang lang="us"/><myLang lang="uk"/><myLang lang="de"/></rsp>')
|
|
275
|
+
=> #<Response::LangListUser:0x2b16c5e17510 @xml=<UNDEFINED> ... </>>
|
|
276
|
+
>> rsp.get_all(:myLang) do |e|
|
|
277
|
+
>> puts "you can use '#{e.attribute('lang').value}'"
|
|
278
|
+
>> end
|
|
279
|
+
you can use 'fr'
|
|
280
|
+
you can use 'us'
|
|
281
|
+
you can use 'uk'
|
|
282
|
+
you can use 'de'
|
|
283
|
+
=> [nil, nil, nil, nil]
|
|
284
|
+
</pre>
|
|
285
|
+
<p>
|
|
286
|
+
<b>usage of returned value</b>
|
|
287
|
+
</p>
|
|
288
|
+
<pre>
|
|
289
|
+
>> langs = rsp.get_all(:myLang) { |e| e.attribute('lang').value }
|
|
290
|
+
=> ["fr", "us", "uk", "de"]
|
|
291
|
+
</pre>
|
|
292
|
+
<p><a class="source-toggle" href="#"
|
|
293
|
+
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
|
294
|
+
<div class="method-source-code" id="M000007-source">
|
|
295
|
+
<pre>
|
|
296
|
+
<span class="ruby-comment cmt"># File lib/violet/response.rb, line 117</span>
|
|
297
|
+
117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_all</span> <span class="ruby-identifier">name</span>
|
|
298
|
+
118: <span class="ruby-comment cmt"># REXML::XPath.match(@xml, element).collect do |e| <= this one is for a recursive search.</span>
|
|
299
|
+
119: <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">elements</span>.<span class="ruby-identifier">collect</span>(<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
|
|
300
|
+
120: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">e</span>) <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">e</span> <span class="ruby-keyword kw">end</span>
|
|
301
|
+
121: <span class="ruby-keyword kw">end</span>
|
|
302
|
+
122: <span class="ruby-keyword kw">end</span>
|
|
303
|
+
</pre>
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
<div id="method-M000005" class="method-detail">
|
|
309
|
+
<a name="M000005"></a>
|
|
310
|
+
|
|
311
|
+
<div class="method-heading">
|
|
312
|
+
<a href="#M000005" class="method-signature">
|
|
313
|
+
<span class="method-name">good?</span><span class="method-args">()</span>
|
|
314
|
+
</a>
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
<div class="method-description">
|
|
318
|
+
<p>
|
|
319
|
+
return <tt>true</tt> if the response is not an error, <tt>false</tt>
|
|
320
|
+
otherwhise.
|
|
321
|
+
</p>
|
|
322
|
+
<p><a class="source-toggle" href="#"
|
|
323
|
+
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
|
324
|
+
<div class="method-source-code" id="M000005-source">
|
|
325
|
+
<pre>
|
|
326
|
+
<span class="ruby-comment cmt"># File lib/violet/response.rb, line 83</span>
|
|
327
|
+
83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">good?</span>
|
|
328
|
+
84: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">GoodServerRsp</span>
|
|
329
|
+
85: <span class="ruby-keyword kw">end</span>
|
|
330
|
+
</pre>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
</div>
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
</div>
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
<div id="validator-badges">
|
|
343
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
344
|
+
</div>
|
|
345
|
+
|
|
346
|
+
</body>
|
|
347
|
+
</html>
|
|
@@ -0,0 +1,162 @@
|
|
|
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>Module: Response::Base</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>Module</strong></td>
|
|
53
|
+
<td class="class-name-in-header">Response::Base</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../files/lib/violet/response_rb.html">
|
|
59
|
+
lib/violet/response.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
</table>
|
|
66
|
+
</div>
|
|
67
|
+
<!-- banner header -->
|
|
68
|
+
|
|
69
|
+
<div id="bodyContent">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<div id="contextContent">
|
|
74
|
+
<div id="diagram">
|
|
75
|
+
<map id="map" name="map">
|
|
76
|
+
<area shape="rect" coords="1625,229,1732,277" href="Base/GoodServerRsp.html" alt="GoodServerRsp" />
|
|
77
|
+
<area shape="rect" coords="27,325,136,373" href="EarPositionSend.html" alt="EarPositionSend" />
|
|
78
|
+
<area shape="rect" coords="160,325,256,373" href="NabCastSend.html" alt="NabCastSend" />
|
|
79
|
+
<area shape="rect" coords="280,325,384,373" href="CommandSend.html" alt="CommandSend" />
|
|
80
|
+
<area shape="rect" coords="408,325,485,373" href="Signature.html" alt="Signature" />
|
|
81
|
+
<area shape="rect" coords="509,325,595,373" href="PositionEar.html" alt="PositionEar" />
|
|
82
|
+
<area shape="rect" coords="619,325,707,373" href="VoiceListTts.html" alt="VoiceListTts" />
|
|
83
|
+
<area shape="rect" coords="731,325,819,373" href="LinkPreview.html" alt="LinkPreview" />
|
|
84
|
+
<area shape="rect" coords="843,325,941,373" href="MessageSend.html" alt="MessageSend" />
|
|
85
|
+
<area shape="rect" coords="965,325,1059,373" href="LangListUser.html" alt="LangListUser" />
|
|
86
|
+
<area shape="rect" coords="1083,325,1173,373" href="RabbitName.html" alt="RabbitName" />
|
|
87
|
+
<area shape="rect" coords="1197,325,1269,373" href="TtsSend.html" alt="TtsSend" />
|
|
88
|
+
<area shape="rect" coords="1293,325,1405,373" href="ListReceivedMsg.html" alt="ListReceivedMsg" />
|
|
89
|
+
<area shape="rect" coords="1429,325,1507,373" href="ListFriend.html" alt="ListFriend" />
|
|
90
|
+
<area shape="rect" coords="1531,325,1619,373" href="RabbitSleep.html" alt="RabbitSleep" />
|
|
91
|
+
<area shape="rect" coords="1643,325,1715,373" href="Blacklist.html" alt="Blacklist" />
|
|
92
|
+
<area shape="rect" coords="1739,325,1816,373" href="Timezone.html" alt="Timezone" />
|
|
93
|
+
<area shape="rect" coords="1840,325,1939,373" href="RabbitVersion.html" alt="RabbitVersion" />
|
|
94
|
+
<area shape="rect" coords="1963,325,2067,373" href="WebRadioSend.html" alt="WebRadioSend" />
|
|
95
|
+
<area shape="rect" coords="2091,325,2168,373" href="ChorSend.html" alt="ChorSend" />
|
|
96
|
+
<area shape="rect" coords="1756,229,1855,277" href="Base/BadServerRsp.html" alt="BadServerRsp" />
|
|
97
|
+
<area shape="rect" coords="2192,325,2331,373" href="NoGoodTokenOrSerial.html" alt="NoGoodTokenOrSerial" />
|
|
98
|
+
<area shape="rect" coords="2355,325,2451,373" href="ChorNotSend.html" alt="ChorNotSend" />
|
|
99
|
+
<area shape="rect" coords="2475,325,2589,373" href="NabCastNotSend.html" alt="NabCastNotSend" />
|
|
100
|
+
<area shape="rect" coords="2613,325,2728,373" href="MessageNotSend.html" alt="MessageNotSend" />
|
|
101
|
+
<area shape="rect" coords="2752,325,2851,373" href="AbuseSending.html" alt="AbuseSending" />
|
|
102
|
+
<area shape="rect" coords="2875,325,3008,373" href="NoCorrectParameters.html" alt="NoCorrectParameters" />
|
|
103
|
+
<area shape="rect" coords="3032,325,3120,373" href="TtsNotSend.html" alt="TtsNotSend" />
|
|
104
|
+
<area shape="rect" coords="3144,325,3235,373" href="NotV2Rabbit.html" alt="NotV2Rabbit" />
|
|
105
|
+
<area shape="rect" coords="3259,325,3381,373" href="WebRadioNotSend.html" alt="WebRadioNotSend" />
|
|
106
|
+
<area shape="rect" coords="3405,325,3531,373" href="EarPositionNotSend.html" alt="EarPositionNotSend" />
|
|
107
|
+
<area shape="rect" coords="1149,5,1227,53" href="../Exception.html" alt="Exception" />
|
|
108
|
+
<area shape="rect" coords="1131,133,1245,181" href="ProtocolExcepion.html" alt="ProtocolExcepion" />
|
|
109
|
+
<area shape="rect" coords="1765,133,1845,181" href="Base/ServerRsp.html" alt="ServerRsp" />
|
|
110
|
+
<area shape="rect" coords="1879,229,1991,277" href="EmptyServerRsp.html" alt="EmptyServerRsp" />
|
|
111
|
+
<area shape="rect" coords="1615,99,1865,288" href="Base.html" alt="Base" />
|
|
112
|
+
<area shape="rect" coords="16,64,3541,384" href="../Response.html" alt="Response" />
|
|
113
|
+
</map>
|
|
114
|
+
<img src="../../dot/f_5.png" usemap="#map" border="0" alt="dot/f_5.png">
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<div id="description">
|
|
118
|
+
<p>
|
|
119
|
+
contains some basic stuff, abstract class etc. they‘re used internaly
|
|
120
|
+
and you should not access this module.
|
|
121
|
+
</p>
|
|
122
|
+
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
<!-- if includes -->
|
|
133
|
+
|
|
134
|
+
<div id="section">
|
|
135
|
+
|
|
136
|
+
<div id="class-list">
|
|
137
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
|
138
|
+
|
|
139
|
+
Class <a href="Base/BadServerRsp.html" class="link">Response::Base::BadServerRsp</a><br />
|
|
140
|
+
Class <a href="Base/GoodServerRsp.html" class="link">Response::Base::GoodServerRsp</a><br />
|
|
141
|
+
Class <a href="Base/ServerRsp.html" class="link">Response::Base::ServerRsp</a><br />
|
|
142
|
+
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
<!-- if method_list -->
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
<div id="validator-badges">
|
|
158
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
</body>
|
|
162
|
+
</html>
|