brauser 3.3.2 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +6 -0
  3. data/.travis-gemfile +4 -5
  4. data/.travis.yml +2 -2
  5. data/CHANGELOG.md +4 -0
  6. data/Gemfile +7 -8
  7. data/README.md +31 -95
  8. data/Rakefile +0 -1
  9. data/brauser.gemspec +4 -4
  10. data/default_definitions/browsers.rb +50 -0
  11. data/default_definitions/languages.rb +118 -0
  12. data/default_definitions/platforms.rb +24 -0
  13. data/doc/Brauser.html +6 -6
  14. data/doc/Brauser/Browser.html +3867 -580
  15. data/doc/Brauser/Definitions.html +537 -0
  16. data/doc/Brauser/Definitions/Base.html +342 -0
  17. data/doc/Brauser/Definitions/Browser.html +1047 -0
  18. data/doc/Brauser/Definitions/Language.html +496 -0
  19. data/doc/Brauser/Definitions/Platform.html +686 -0
  20. data/doc/Brauser/Hooks.html +2 -2
  21. data/doc/Brauser/Hooks/RubyOnRails.html +9 -9
  22. data/doc/Brauser/Parser.html +513 -0
  23. data/doc/Brauser/Value.html +601 -0
  24. data/doc/Brauser/Version.html +5 -5
  25. data/doc/_index.html +25 -108
  26. data/doc/class_list.html +1 -1
  27. data/doc/file.README.html +33 -97
  28. data/doc/index.html +33 -97
  29. data/doc/method_list.html +72 -120
  30. data/doc/top-level-namespace.html +2 -2
  31. data/lib/brauser.rb +13 -15
  32. data/lib/brauser/browser.rb +195 -66
  33. data/lib/brauser/definitions/base.rb +71 -0
  34. data/lib/brauser/definitions/browser.rb +80 -0
  35. data/lib/brauser/definitions/language.rb +29 -0
  36. data/lib/brauser/definitions/platform.rb +42 -0
  37. data/lib/brauser/hooks.rb +1 -2
  38. data/lib/brauser/parser.rb +47 -0
  39. data/lib/brauser/value.rb +39 -0
  40. data/lib/brauser/version.rb +3 -4
  41. data/spec/brauser/browser_spec.rb +73 -564
  42. data/spec/brauser/default_definitions_spec.rb +129 -0
  43. data/spec/brauser/definitions/base_spec.rb +48 -0
  44. data/spec/brauser/definitions/browser_spec.rb +47 -0
  45. data/spec/brauser/definitions/language_spec.rb +18 -0
  46. data/spec/brauser/definitions/platform_spec.rb +36 -0
  47. data/spec/brauser/hooks_spec.rb +5 -6
  48. data/spec/brauser/parser_spec.rb +31 -0
  49. data/spec/brauser/value_spec.rb +34 -0
  50. data/spec/coverage_helper.rb +0 -1
  51. data/spec/spec_helper.rb +0 -1
  52. metadata +50 -23
  53. data/lib/brauser/browseable/attributes.rb +0 -95
  54. data/lib/brauser/browseable/general.rb +0 -104
  55. data/lib/brauser/browseable/parsing.rb +0 -127
  56. data/lib/brauser/browseable/partial_querying.rb +0 -116
  57. data/lib/brauser/browseable/querying.rb +0 -63
  58. data/lib/brauser/browseable/register.rb +0 -73
  59. data/lib/brauser/definition.rb +0 -80
  60. data/lib/brauser/definitions/browsers.rb +0 -68
  61. data/lib/brauser/definitions/languages.rb +0 -130
  62. data/lib/brauser/definitions/platforms.rb +0 -30
  63. data/lib/brauser/query.rb +0 -36
  64. data/lib/brauser/queryable/chainers.rb +0 -56
  65. data/lib/brauser/queryable/queries.rb +0 -60
  66. data/spec/brauser/definition_spec.rb +0 -39
  67. data/spec/brauser/query_spec.rb +0 -111
@@ -0,0 +1,601 @@
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
+ Class: Brauser::Value
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
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#!Brauser/Value.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 (V)</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">Value</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>Class: Brauser::Value
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Brauser::Value</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/brauser/value.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+ <p>A defined entity, which supports comparison against a single or multiple values.</p>
105
+
106
+
107
+ </div>
108
+ </div>
109
+ <div class="tags">
110
+
111
+
112
+ </div>
113
+
114
+
115
+
116
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
117
+ <ul class="summary">
118
+
119
+ <li class="public ">
120
+ <span class="summary_signature">
121
+
122
+ <a href="#value-instance_method" title="#value (instance method)">- (Object) <strong>value</strong> </a>
123
+
124
+
125
+
126
+ </span>
127
+
128
+
129
+
130
+
131
+ <span class="note title readonly">readonly</span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="summary_desc"><div class='inline'><p>The wrapped value.</p>
142
+ </div></span>
143
+
144
+ </li>
145
+
146
+
147
+ </ul>
148
+
149
+
150
+
151
+
152
+
153
+ <h2>
154
+ Instance Method Summary
155
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
156
+ </h2>
157
+
158
+ <ul class="summary">
159
+
160
+ <li class="public ">
161
+ <span class="summary_signature">
162
+
163
+ <a href="#%3D%3D-instance_method" title="#== (instance method)">- (Boolean) <strong>==</strong>(other) </a>
164
+
165
+
166
+
167
+ </span>
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+ <span class="summary_desc"><div class='inline'><p>Check if an object is equal to another object or if it is contained in a list of objects.</p>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Value) <strong>initialize</strong>(value) </a>
187
+
188
+
189
+
190
+ </span>
191
+
192
+
193
+ <span class="note title constructor">constructor</span>
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <span class="summary_desc"><div class='inline'><p>Creates a new value.</p>
203
+ </div></span>
204
+
205
+ </li>
206
+
207
+
208
+ <li class="public ">
209
+ <span class="summary_signature">
210
+
211
+ <a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(method, *args, &amp;block) </a>
212
+
213
+
214
+
215
+ </span>
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+ <span class="summary_desc"><div class='inline'><p>Delegates all the other values to the wrapped value.</p>
226
+ </div></span>
227
+
228
+ </li>
229
+
230
+
231
+ </ul>
232
+
233
+
234
+ <div id="constructor_details" class="method_details_list">
235
+ <h2>Constructor Details</h2>
236
+
237
+ <div class="method_details first">
238
+ <h3 class="signature first" id="initialize-instance_method">
239
+
240
+ - (<tt><span class='object_link'><a href="" title="Brauser::Value (class)">Value</a></span></tt>) <strong>initialize</strong>(value)
241
+
242
+
243
+
244
+
245
+
246
+ </h3><div class="docstring">
247
+ <div class="discussion">
248
+ <p>Creates a new value</p>
249
+
250
+
251
+ </div>
252
+ </div>
253
+ <div class="tags">
254
+ <p class="tag_title">Parameters:</p>
255
+ <ul class="param">
256
+
257
+ <li>
258
+
259
+ <span class='name'>value</span>
260
+
261
+
262
+ <span class='type'>(<tt>Object</tt>)</span>
263
+
264
+
265
+
266
+ &mdash;
267
+ <div class='inline'><p>The wrapped value.</p>
268
+ </div>
269
+
270
+ </li>
271
+
272
+ </ul>
273
+
274
+
275
+ </div><table class="source_code">
276
+ <tr>
277
+ <td>
278
+ <pre class="lines">
279
+
280
+
281
+ 18
282
+ 19
283
+ 20</pre>
284
+ </td>
285
+ <td>
286
+ <pre class="code"><span class="info file"># File 'lib/brauser/value.rb', line 18</span>
287
+
288
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
289
+ <span class='ivar'>@value</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
290
+ <span class='kw'>end</span></pre>
291
+ </td>
292
+ </tr>
293
+ </table>
294
+ </div>
295
+
296
+ </div>
297
+ <div id="method_missing_details" class="method_details_list">
298
+ <h2>Dynamic Method Handling</h2>
299
+ <p class="notice this">
300
+ This class handles dynamic methods through the <tt>method_missing</tt> method
301
+
302
+ </p>
303
+
304
+ <div class="method_details first">
305
+ <h3 class="signature first" id="method_missing-instance_method">
306
+
307
+ - (<tt>Object</tt>) <strong>method_missing</strong>(method, *args, &amp;block)
308
+
309
+
310
+
311
+
312
+
313
+ </h3><div class="docstring">
314
+ <div class="discussion">
315
+ <p>Delegates all the other values to the wrapped value.</p>
316
+
317
+
318
+ </div>
319
+ </div>
320
+ <div class="tags">
321
+ <p class="tag_title">Parameters:</p>
322
+ <ul class="param">
323
+
324
+ <li>
325
+
326
+ <span class='name'>method</span>
327
+
328
+
329
+ <span class='type'>(<tt>Symbol</tt>)</span>
330
+
331
+
332
+
333
+ &mdash;
334
+ <div class='inline'><p>The method to call.</p>
335
+ </div>
336
+
337
+ </li>
338
+
339
+ <li>
340
+
341
+ <span class='name'>args</span>
342
+
343
+
344
+ <span class='type'>(<tt>Array</tt>)</span>
345
+
346
+
347
+
348
+ &mdash;
349
+ <div class='inline'><p>The arguments to pass to the method.</p>
350
+ </div>
351
+
352
+ </li>
353
+
354
+ <li>
355
+
356
+ <span class='name'>block</span>
357
+
358
+
359
+ <span class='type'>(<tt>Proc</tt>)</span>
360
+
361
+
362
+
363
+ &mdash;
364
+ <div class='inline'><p>The block to pass to the method.</p>
365
+ </div>
366
+
367
+ </li>
368
+
369
+ </ul>
370
+
371
+
372
+ </div><table class="source_code">
373
+ <tr>
374
+ <td>
375
+ <pre class="lines">
376
+
377
+
378
+ 35
379
+ 36
380
+ 37</pre>
381
+ </td>
382
+ <td>
383
+ <pre class="code"><span class="info file"># File 'lib/brauser/value.rb', line 35</span>
384
+
385
+ <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
386
+ <span class='ivar'>@value</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
387
+ <span class='kw'>end</span></pre>
388
+ </td>
389
+ </tr>
390
+ </table>
391
+ </div>
392
+
393
+ </div>
394
+
395
+ <div id="instance_attr_details" class="attr_details">
396
+ <h2>Instance Attribute Details</h2>
397
+
398
+
399
+ <span id=""></span>
400
+ <div class="method_details first">
401
+ <h3 class="signature first" id="value-instance_method">
402
+
403
+ - (<tt>Object</tt>) <strong>value</strong> <span class="extras">(readonly)</span>
404
+
405
+
406
+
407
+
408
+
409
+ </h3><div class="docstring">
410
+ <div class="discussion">
411
+ <p>Returns The wrapped value.</p>
412
+
413
+
414
+ </div>
415
+ </div>
416
+ <div class="tags">
417
+
418
+ <p class="tag_title">Returns:</p>
419
+ <ul class="return">
420
+
421
+ <li>
422
+
423
+
424
+ <span class='type'>(<tt>Object</tt>)</span>
425
+
426
+
427
+
428
+ &mdash;
429
+ <div class='inline'><p>The wrapped value.</p>
430
+ </div>
431
+
432
+ </li>
433
+
434
+ </ul>
435
+
436
+ </div><table class="source_code">
437
+ <tr>
438
+ <td>
439
+ <pre class="lines">
440
+
441
+
442
+ 11
443
+ 12
444
+ 13
445
+ 14
446
+ 15
447
+ 16
448
+ 17
449
+ 18
450
+ 19
451
+ 20
452
+ 21
453
+ 22
454
+ 23
455
+ 24
456
+ 25
457
+ 26
458
+ 27
459
+ 28
460
+ 29
461
+ 30
462
+ 31
463
+ 32
464
+ 33
465
+ 34
466
+ 35
467
+ 36
468
+ 37
469
+ 38</pre>
470
+ </td>
471
+ <td>
472
+ <pre class="code"><span class="info file"># File 'lib/brauser/value.rb', line 11</span>
473
+
474
+ <span class='kw'>class</span> <span class='const'>Value</span>
475
+ <span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:value</span>
476
+ <span class='id identifier rubyid_delegate'>delegate</span> <span class='symbol'>:to_s</span><span class='comma'>,</span> <span class='symbol'>:inspect</span><span class='comma'>,</span> <span class='label'>to:</span> <span class='symbol'>:value</span>
477
+
478
+ <span class='comment'># Creates a new value
479
+ </span> <span class='comment'>#
480
+ </span> <span class='comment'># @param value [Object] The wrapped value.
481
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
482
+ <span class='ivar'>@value</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
483
+ <span class='kw'>end</span>
484
+
485
+ <span class='comment'># Check if an object is equal to another object or if it is contained in a list of objects.
486
+ </span> <span class='comment'>#
487
+ </span> <span class='comment'># @param other [Array|Object] The other object to match.
488
+ </span> <span class='comment'># @return [Boolean] `true` if the current object is either equal or contained in the other object, `false` otherwise.
489
+ </span> <span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
490
+ <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@value</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='lparen'>(</span><span class='ivar'>@value</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
491
+ <span class='kw'>end</span>
492
+
493
+ <span class='comment'># Delegates all the other values to the wrapped value.
494
+ </span> <span class='comment'>#
495
+ </span> <span class='comment'># @param method [Symbol] The method to call.
496
+ </span> <span class='comment'># @param args [Array] The arguments to pass to the method.
497
+ </span> <span class='comment'># @param block [Proc] The block to pass to the method.
498
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
499
+ <span class='ivar'>@value</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
500
+ <span class='kw'>end</span>
501
+ <span class='kw'>end</span></pre>
502
+ </td>
503
+ </tr>
504
+ </table>
505
+ </div>
506
+
507
+ </div>
508
+
509
+
510
+ <div id="instance_method_details" class="method_details_list">
511
+ <h2>Instance Method Details</h2>
512
+
513
+
514
+ <div class="method_details first">
515
+ <h3 class="signature first" id="==-instance_method">
516
+
517
+ - (<tt>Boolean</tt>) <strong>==</strong>(other)
518
+
519
+
520
+
521
+
522
+
523
+ </h3><div class="docstring">
524
+ <div class="discussion">
525
+ <p>Check if an object is equal to another object or if it is contained in a list of objects.</p>
526
+
527
+
528
+ </div>
529
+ </div>
530
+ <div class="tags">
531
+ <p class="tag_title">Parameters:</p>
532
+ <ul class="param">
533
+
534
+ <li>
535
+
536
+ <span class='name'>other</span>
537
+
538
+
539
+ <span class='type'>(<tt>Array|Object</tt>)</span>
540
+
541
+
542
+
543
+ &mdash;
544
+ <div class='inline'><p>The other object to match.</p>
545
+ </div>
546
+
547
+ </li>
548
+
549
+ </ul>
550
+
551
+ <p class="tag_title">Returns:</p>
552
+ <ul class="return">
553
+
554
+ <li>
555
+
556
+
557
+ <span class='type'>(<tt>Boolean</tt>)</span>
558
+
559
+
560
+
561
+ &mdash;
562
+ <div class='inline'><p><code>true</code> if the current object is either equal or contained in the other object, <code>false</code> otherwise.</p>
563
+ </div>
564
+
565
+ </li>
566
+
567
+ </ul>
568
+
569
+ </div><table class="source_code">
570
+ <tr>
571
+ <td>
572
+ <pre class="lines">
573
+
574
+
575
+ 26
576
+ 27
577
+ 28</pre>
578
+ </td>
579
+ <td>
580
+ <pre class="code"><span class="info file"># File 'lib/brauser/value.rb', line 26</span>
581
+
582
+ <span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
583
+ <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@value</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='lparen'>(</span><span class='ivar'>@value</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
584
+ <span class='kw'>end</span></pre>
585
+ </td>
586
+ </tr>
587
+ </table>
588
+ </div>
589
+
590
+ </div>
591
+
592
+ </div>
593
+
594
+ <div id="footer">
595
+ Generated on Mon Sep 29 16:43:31 2014 by
596
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
597
+ 0.8.7.4 (ruby-2.1.3).
598
+ </div>
599
+
600
+ </body>
601
+ </html>