brauser 3.0.0 → 3.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.
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Sun May 19 12:02:56 2013 by
119
+ Generated on Sun May 19 15:39:13 2013 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.8.6.1 (ruby-1.9.3).
122
122
  </div>
@@ -323,7 +323,7 @@
323
323
  </div>
324
324
 
325
325
  <div id="footer">
326
- Generated on Sun May 19 12:02:56 2013 by
326
+ Generated on Sun May 19 15:39:13 2013 by
327
327
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
328
328
  0.8.6.1 (ruby-1.9.3).
329
329
  </div>
@@ -0,0 +1,591 @@
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: Brauser::Queries
8
+
9
+ &mdash; Documentation by YARD 0.8.6.1
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#!" + escape(window.location.href);
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 (Q)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Brauser.html" title="Brauser (module)">Brauser</a></span></span>
36
+ &raquo;
37
+ <span class="title">Queries</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: Brauser::Queries
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+ <dt class="r1">Included in:</dt>
81
+ <dd class="r1"><span class='object_link'><a href="Query.html" title="Brauser::Query (class)">Query</a></span></dd>
82
+
83
+
84
+
85
+ <dt class="r2 last">Defined in:</dt>
86
+ <dd class="r2 last">lib/brauser/query.rb</dd>
87
+
88
+ </dl>
89
+ <div class="clear"></div>
90
+
91
+ <h2>Overview</h2><div class="docstring">
92
+ <div class="discussion">
93
+ <p>Methods to make queries.</p>
94
+
95
+
96
+ </div>
97
+ </div>
98
+ <div class="tags">
99
+
100
+
101
+ </div>
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <h2>
110
+ Instance Method Summary
111
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
112
+ </h2>
113
+
114
+ <ul class="summary">
115
+
116
+ <li class="public ">
117
+ <span class="summary_signature">
118
+
119
+ <a href="#accepts%3F-instance_method" title="#accepts? (instance method)">- (Boolean) <strong>accepts?</strong>(langs = []) </a>
120
+
121
+
122
+
123
+ </span>
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ <span class="summary_desc"><div class='inline'><p>Check if the browser accepts the specified languages.</p>
134
+ </div></span>
135
+
136
+ </li>
137
+
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#is%3F-instance_method" title="#is? (instance method)">- (Boolean) <strong>is?</strong>(names = [], versions = {}, platforms = []) </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'><p>Checks if the browser is a specific name and optionally of a specific version and platform.</p>
157
+ </div></span>
158
+
159
+ </li>
160
+
161
+
162
+ <li class="public ">
163
+ <span class="summary_signature">
164
+
165
+ <a href="#on%3F-instance_method" title="#on? (instance method)">- (Boolean) <strong>on?</strong>(platforms = []) </a>
166
+
167
+
168
+
169
+ </span>
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+ <span class="summary_desc"><div class='inline'><p>Check if the browser is on a specific platform.</p>
180
+ </div></span>
181
+
182
+ </li>
183
+
184
+
185
+ <li class="public ">
186
+ <span class="summary_signature">
187
+
188
+ <a href="#v%3F-instance_method" title="#v? (instance method)">- (Boolean) <strong>v?</strong>(versions = {}) </a>
189
+
190
+
191
+
192
+ </span>
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <span class="summary_desc"><div class='inline'><p>Checks if the browser is a specific version.</p>
203
+ </div></span>
204
+
205
+ </li>
206
+
207
+
208
+ </ul>
209
+
210
+
211
+
212
+
213
+ <div id="instance_method_details" class="method_details_list">
214
+ <h2>Instance Method Details</h2>
215
+
216
+
217
+ <div class="method_details first">
218
+ <h3 class="signature first" id="accepts?-instance_method">
219
+
220
+ - (<tt>Boolean</tt>) <strong>accepts?</strong>(langs = [])
221
+
222
+
223
+
224
+
225
+
226
+ </h3><div class="docstring">
227
+ <div class="discussion">
228
+ <p>Check if the browser accepts the specified languages.</p>
229
+
230
+ <p>This version returns a boolean and it is equal to append a call to <code>#result</code> to the method `#accepts.</p>
231
+
232
+
233
+ </div>
234
+ </div>
235
+ <div class="tags">
236
+ <p class="tag_title">Parameters:</p>
237
+ <ul class="param">
238
+
239
+ <li>
240
+
241
+ <span class='name'>langs</span>
242
+
243
+
244
+ <span class='type'>(<tt>String|Array</tt>)</span>
245
+
246
+
247
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
248
+
249
+
250
+ &mdash;
251
+ <div class='inline'><p>A list of languages to match against.</p>
252
+ </div>
253
+
254
+ </li>
255
+
256
+ </ul>
257
+
258
+ <p class="tag_title">Returns:</p>
259
+ <ul class="return">
260
+
261
+ <li>
262
+
263
+
264
+ <span class='type'>(<tt>Boolean</tt>)</span>
265
+
266
+
267
+
268
+ &mdash;
269
+ <div class='inline'><p><code>true</code> if current browser matches, <code>false</code> otherwise.</p>
270
+ </div>
271
+
272
+ </li>
273
+
274
+ </ul>
275
+
276
+ </div><table class="source_code">
277
+ <tr>
278
+ <td>
279
+ <pre class="lines">
280
+
281
+
282
+ 96
283
+ 97
284
+ 98</pre>
285
+ </td>
286
+ <td>
287
+ <pre class="code"><span class="info file"># File 'lib/brauser/query.rb', line 96</span>
288
+
289
+ <span class='kw'>def</span> <span class='id identifier rubyid_accepts?'>accepts?</span><span class='lparen'>(</span><span class='id identifier rubyid_langs'>langs</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
290
+ <span class='ivar'>@result</span> <span class='op'>?</span> <span class='ivar'>@target</span><span class='period'>.</span><span class='id identifier rubyid_accepts?'>accepts?</span><span class='lparen'>(</span><span class='id identifier rubyid_langs'>langs</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='ivar'>@result</span>
291
+ <span class='kw'>end</span></pre>
292
+ </td>
293
+ </tr>
294
+ </table>
295
+ </div>
296
+
297
+ <div class="method_details ">
298
+ <h3 class="signature " id="is?-instance_method">
299
+
300
+ - (<tt>Boolean</tt>) <strong>is?</strong>(names = [], versions = {}, platforms = [])
301
+
302
+
303
+
304
+
305
+
306
+ </h3><div class="docstring">
307
+ <div class="discussion">
308
+ <p>Checks if the browser is a specific name and optionally of a specific version and platform.</p>
309
+
310
+ <p>This version returns a boolean and it is equal to append a call to <code>#result</code> to the method <code>#is</code>.</p>
311
+
312
+
313
+ </div>
314
+ </div>
315
+ <div class="tags">
316
+ <p class="tag_title">Parameters:</p>
317
+ <ul class="param">
318
+
319
+ <li>
320
+
321
+ <span class='name'>names</span>
322
+
323
+
324
+ <span class='type'>(<tt>Symbol|Array</tt>)</span>
325
+
326
+
327
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
328
+
329
+
330
+ &mdash;
331
+ <div class='inline'><p>A list of specific names to match. Also, this meta-names are supported: <code>:capable</code> and <code>:tablet</code>.</p>
332
+ </div>
333
+
334
+ </li>
335
+
336
+ <li>
337
+
338
+ <span class='name'>versions</span>
339
+
340
+
341
+ <span class='type'>(<tt>Hash</tt>)</span>
342
+
343
+
344
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
345
+
346
+
347
+ &mdash;
348
+ <div class='inline'><p>An hash with specific version to match against. Need to be in any form that <code>#v</code> understands.</p>
349
+ </div>
350
+
351
+ </li>
352
+
353
+ <li>
354
+
355
+ <span class='name'>platforms</span>
356
+
357
+
358
+ <span class='type'>(<tt>Symbol|Array</tt>)</span>
359
+
360
+
361
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
362
+
363
+
364
+ &mdash;
365
+ <div class='inline'><p>A list of specific platform to match. Valid values are all those possible for the platform attribute.</p>
366
+ </div>
367
+
368
+ </li>
369
+
370
+ </ul>
371
+
372
+ <p class="tag_title">Returns:</p>
373
+ <ul class="return">
374
+
375
+ <li>
376
+
377
+
378
+ <span class='type'>(<tt>Boolean</tt>)</span>
379
+
380
+
381
+
382
+ &mdash;
383
+ <div class='inline'><p><code>true</code> if current browser matches, <code>false</code> otherwise.</p>
384
+ </div>
385
+
386
+ </li>
387
+
388
+ </ul>
389
+
390
+ <p class="tag_title">See Also:</p>
391
+ <ul class="see">
392
+
393
+ <li><span class='object_link'><a href="#v%3F-instance_method" title="Brauser::Queries#v? (method)">#v?</a></span></li>
394
+
395
+ <li><span class='object_link'><a href="#on%3F-instance_method" title="Brauser::Queries#on? (method)">#on?</a></span></li>
396
+
397
+ </ul>
398
+
399
+ </div><table class="source_code">
400
+ <tr>
401
+ <td>
402
+ <pre class="lines">
403
+
404
+
405
+ 66
406
+ 67
407
+ 68</pre>
408
+ </td>
409
+ <td>
410
+ <pre class="code"><span class="info file"># File 'lib/brauser/query.rb', line 66</span>
411
+
412
+ <span class='kw'>def</span> <span class='id identifier rubyid_is?'>is?</span><span class='lparen'>(</span><span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_versions'>versions</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_platforms'>platforms</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
413
+ <span class='ivar'>@result</span> <span class='op'>?</span> <span class='ivar'>@target</span><span class='period'>.</span><span class='id identifier rubyid_is?'>is?</span><span class='lparen'>(</span><span class='id identifier rubyid_names'>names</span><span class='comma'>,</span> <span class='id identifier rubyid_versions'>versions</span><span class='comma'>,</span> <span class='id identifier rubyid_platforms'>platforms</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='ivar'>@result</span>
414
+ <span class='kw'>end</span></pre>
415
+ </td>
416
+ </tr>
417
+ </table>
418
+ </div>
419
+
420
+ <div class="method_details ">
421
+ <h3 class="signature " id="on?-instance_method">
422
+
423
+ - (<tt>Boolean</tt>) <strong>on?</strong>(platforms = [])
424
+
425
+
426
+
427
+
428
+
429
+ </h3><div class="docstring">
430
+ <div class="discussion">
431
+ <p>Check if the browser is on a specific platform.</p>
432
+
433
+ <p>This version returns a boolean and it is equal to append a call to <code>#result</code> to the method `#on.</p>
434
+
435
+
436
+ </div>
437
+ </div>
438
+ <div class="tags">
439
+ <p class="tag_title">Parameters:</p>
440
+ <ul class="param">
441
+
442
+ <li>
443
+
444
+ <span class='name'>platforms</span>
445
+
446
+
447
+ <span class='type'>(<tt>Symbol|Array</tt>)</span>
448
+
449
+
450
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
451
+
452
+
453
+ &mdash;
454
+ <div class='inline'><p>A list of specific platform to match.</p>
455
+ </div>
456
+
457
+ </li>
458
+
459
+ </ul>
460
+
461
+ <p class="tag_title">Returns:</p>
462
+ <ul class="return">
463
+
464
+ <li>
465
+
466
+
467
+ <span class='type'>(<tt>Boolean</tt>)</span>
468
+
469
+
470
+
471
+ &mdash;
472
+ <div class='inline'><p><code>true</code> if current browser matches, <code>false</code> otherwise.</p>
473
+ </div>
474
+
475
+ </li>
476
+
477
+ </ul>
478
+
479
+ </div><table class="source_code">
480
+ <tr>
481
+ <td>
482
+ <pre class="lines">
483
+
484
+
485
+ 86
486
+ 87
487
+ 88</pre>
488
+ </td>
489
+ <td>
490
+ <pre class="code"><span class="info file"># File 'lib/brauser/query.rb', line 86</span>
491
+
492
+ <span class='kw'>def</span> <span class='id identifier rubyid_on?'>on?</span><span class='lparen'>(</span><span class='id identifier rubyid_platforms'>platforms</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
493
+ <span class='ivar'>@result</span> <span class='op'>?</span> <span class='ivar'>@target</span><span class='period'>.</span><span class='id identifier rubyid_on?'>on?</span><span class='lparen'>(</span><span class='id identifier rubyid_platforms'>platforms</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='ivar'>@result</span>
494
+ <span class='kw'>end</span></pre>
495
+ </td>
496
+ </tr>
497
+ </table>
498
+ </div>
499
+
500
+ <div class="method_details ">
501
+ <h3 class="signature " id="v?-instance_method">
502
+
503
+ - (<tt>Boolean</tt>) <strong>v?</strong>(versions = {})
504
+
505
+
506
+
507
+
508
+
509
+ </h3><div class="docstring">
510
+ <div class="discussion">
511
+ <p>Checks if the browser is a specific version.</p>
512
+
513
+ <p>This version returns a boolean and it is equal to append a call to <code>#result</code> to the method <code>#v</code>.</p>
514
+
515
+
516
+ </div>
517
+ </div>
518
+ <div class="tags">
519
+ <p class="tag_title">Parameters:</p>
520
+ <ul class="param">
521
+
522
+ <li>
523
+
524
+ <span class='name'>versions</span>
525
+
526
+
527
+ <span class='type'>(<tt>String|Hash</tt>)</span>
528
+
529
+
530
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
531
+
532
+
533
+ &mdash;
534
+ <div class='inline'><p>A string in the form <code>operator version &amp;&amp; ...</code> (example: <code>&gt;= 7 &amp;&amp; &lt; 4</code>) or an hash with specific version to match against, in form <code>{:operator =&gt; version}</code>, where operator is one of <code>:lt, :lte, :eq, :gt, :gte</code>.</p>
535
+ </div>
536
+
537
+ </li>
538
+
539
+ </ul>
540
+
541
+ <p class="tag_title">Returns:</p>
542
+ <ul class="return">
543
+
544
+ <li>
545
+
546
+
547
+ <span class='type'>(<tt>Boolean</tt>)</span>
548
+
549
+
550
+
551
+ &mdash;
552
+ <div class='inline'><p><code>true</code> if current browser matches, <code>false</code> otherwise.</p>
553
+ </div>
554
+
555
+ </li>
556
+
557
+ </ul>
558
+
559
+ </div><table class="source_code">
560
+ <tr>
561
+ <td>
562
+ <pre class="lines">
563
+
564
+
565
+ 76
566
+ 77
567
+ 78</pre>
568
+ </td>
569
+ <td>
570
+ <pre class="code"><span class="info file"># File 'lib/brauser/query.rb', line 76</span>
571
+
572
+ <span class='kw'>def</span> <span class='id identifier rubyid_v?'>v?</span><span class='lparen'>(</span><span class='id identifier rubyid_versions'>versions</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
573
+ <span class='ivar'>@result</span> <span class='op'>?</span> <span class='ivar'>@target</span><span class='period'>.</span><span class='id identifier rubyid_v?'>v?</span><span class='lparen'>(</span><span class='id identifier rubyid_versions'>versions</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='ivar'>@result</span>
574
+ <span class='kw'>end</span></pre>
575
+ </td>
576
+ </tr>
577
+ </table>
578
+ </div>
579
+
580
+ </div>
581
+
582
+ </div>
583
+
584
+ <div id="footer">
585
+ Generated on Sun May 19 15:39:13 2013 by
586
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
587
+ 0.8.6.1 (ruby-1.9.3).
588
+ </div>
589
+
590
+ </body>
591
+ </html>