brauser 3.3.2 → 4.0.0

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 (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,496 @@
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::Definitions::Language
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/Definitions/Language.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 (L)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Brauser.html" title="Brauser (module)">Brauser</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Definitions.html" title="Brauser::Definitions (module)">Definitions</a></span></span>
36
+ &raquo;
37
+ <span class="title">Language</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::Definitions::Language
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"><span class='object_link'><a href="Base.html" title="Brauser::Definitions::Base (class)">Base</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="Base.html" title="Brauser::Definitions::Base (class)">Base</a></span></li>
82
+
83
+ <li class="next">Brauser::Definitions::Language</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/brauser/definitions/language.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+ <p>A definition of a language.</p>
107
+
108
+
109
+ </div>
110
+ </div>
111
+ <div class="tags">
112
+
113
+
114
+ </div>
115
+
116
+
117
+
118
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
119
+ <ul class="summary">
120
+
121
+ <li class="public ">
122
+ <span class="summary_signature">
123
+
124
+ <a href="#code-instance_method" title="#code (instance method)">- (String) <strong>code</strong> </a>
125
+
126
+
127
+
128
+ </span>
129
+
130
+
131
+
132
+
133
+ <span class="note title readonly">readonly</span>
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+ <span class="summary_desc"><div class='inline'><p>The language code.</p>
144
+ </div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
152
+ <a href="#name-instance_method" title="#name (instance method)">- (String) <strong>name</strong> </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+ <span class="note title readonly">readonly</span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'><p>The language name.</p>
172
+ </div></span>
173
+
174
+ </li>
175
+
176
+
177
+ </ul>
178
+
179
+
180
+
181
+
182
+
183
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Base.html" title="Brauser::Definitions::Base (class)">Base</a></span></h3>
184
+ <p class="inherited"><span class='object_link'><a href="Base.html#id-instance_method" title="Brauser::Definitions::Base#id (method)">#id</a></span></p>
185
+
186
+
187
+
188
+ <h2>
189
+ Instance Method Summary
190
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
191
+ </h2>
192
+
193
+ <ul class="summary">
194
+
195
+ <li class="public ">
196
+ <span class="summary_signature">
197
+
198
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Language) <strong>initialize</strong>(code, name, **_) </a>
199
+
200
+
201
+
202
+ </span>
203
+
204
+
205
+ <span class="note title constructor">constructor</span>
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+ <span class="summary_desc"><div class='inline'><p>Creates a new definition.</p>
215
+ </div></span>
216
+
217
+ </li>
218
+
219
+
220
+ </ul>
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="Brauser::Definitions::Base (class)">Base</a></span></h3>
233
+ <p class="inherited"><span class='object_link'><a href="Base.html#match-instance_method" title="Brauser::Definitions::Base#match (method)">#match</a></span></p>
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::Definitions::Language (class)">Language</a></span></tt>) <strong>initialize</strong>(code, name, **_)
241
+
242
+
243
+
244
+
245
+
246
+ </h3><div class="docstring">
247
+ <div class="discussion">
248
+ <p>Creates a new definition.</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'>code</span>
260
+
261
+
262
+ <span class='type'>(<tt>String</tt>)</span>
263
+
264
+
265
+
266
+ &mdash;
267
+ <div class='inline'><p>The language code.</p>
268
+ </div>
269
+
270
+ </li>
271
+
272
+ <li>
273
+
274
+ <span class='name'>name</span>
275
+
276
+
277
+ <span class='type'>(<tt>String</tt>)</span>
278
+
279
+
280
+
281
+ &mdash;
282
+ <div class='inline'><p>The language name.</p>
283
+ </div>
284
+
285
+ </li>
286
+
287
+ </ul>
288
+
289
+
290
+ </div><table class="source_code">
291
+ <tr>
292
+ <td>
293
+ <pre class="lines">
294
+
295
+
296
+ 21
297
+ 22
298
+ 23
299
+ 24
300
+ 25
301
+ 26</pre>
302
+ </td>
303
+ <td>
304
+ <pre class="code"><span class="info file"># File 'lib/brauser/definitions/language.rb', line 21</span>
305
+
306
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid__'>_</span><span class='rparen'>)</span>
307
+ <span class='id identifier rubyid_code'>code</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>_</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
308
+ <span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
309
+ <span class='ivar'>@code</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span>
310
+ <span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
311
+ <span class='kw'>end</span></pre>
312
+ </td>
313
+ </tr>
314
+ </table>
315
+ </div>
316
+
317
+ </div>
318
+
319
+ <div id="instance_attr_details" class="attr_details">
320
+ <h2>Instance Attribute Details</h2>
321
+
322
+
323
+ <span id=""></span>
324
+ <div class="method_details first">
325
+ <h3 class="signature first" id="code-instance_method">
326
+
327
+ - (<tt>String</tt>) <strong>code</strong> <span class="extras">(readonly)</span>
328
+
329
+
330
+
331
+
332
+
333
+ </h3><div class="docstring">
334
+ <div class="discussion">
335
+ <p>Returns The language code.</p>
336
+
337
+
338
+ </div>
339
+ </div>
340
+ <div class="tags">
341
+
342
+ <p class="tag_title">Returns:</p>
343
+ <ul class="return">
344
+
345
+ <li>
346
+
347
+
348
+ <span class='type'>(<tt>String</tt>)</span>
349
+
350
+
351
+
352
+ &mdash;
353
+ <div class='inline'><p>The language code.</p>
354
+ </div>
355
+
356
+ </li>
357
+
358
+ </ul>
359
+
360
+ </div><table class="source_code">
361
+ <tr>
362
+ <td>
363
+ <pre class="lines">
364
+
365
+
366
+ 14
367
+ 15
368
+ 16
369
+ 17
370
+ 18
371
+ 19
372
+ 20
373
+ 21
374
+ 22
375
+ 23
376
+ 24
377
+ 25
378
+ 26
379
+ 27</pre>
380
+ </td>
381
+ <td>
382
+ <pre class="code"><span class="info file"># File 'lib/brauser/definitions/language.rb', line 14</span>
383
+
384
+ <span class='kw'>class</span> <span class='const'>Language</span> <span class='op'>&lt;</span> <span class='const'>Base</span>
385
+ <span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:code</span><span class='comma'>,</span> <span class='symbol'>:name</span>
386
+
387
+ <span class='comment'># Creates a new definition.
388
+ </span> <span class='comment'>#
389
+ </span> <span class='comment'># @param code [String] The language code.
390
+ </span> <span class='comment'># @param name [String] The language name.
391
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid__'>_</span><span class='rparen'>)</span>
392
+ <span class='id identifier rubyid_code'>code</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>_</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
393
+ <span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
394
+ <span class='ivar'>@code</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span>
395
+ <span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
396
+ <span class='kw'>end</span>
397
+ <span class='kw'>end</span></pre>
398
+ </td>
399
+ </tr>
400
+ </table>
401
+ </div>
402
+
403
+
404
+ <span id=""></span>
405
+ <div class="method_details ">
406
+ <h3 class="signature " id="name-instance_method">
407
+
408
+ - (<tt>String</tt>) <strong>name</strong> <span class="extras">(readonly)</span>
409
+
410
+
411
+
412
+
413
+
414
+ </h3><div class="docstring">
415
+ <div class="discussion">
416
+ <p>Returns The language name.</p>
417
+
418
+
419
+ </div>
420
+ </div>
421
+ <div class="tags">
422
+
423
+ <p class="tag_title">Returns:</p>
424
+ <ul class="return">
425
+
426
+ <li>
427
+
428
+
429
+ <span class='type'>(<tt>String</tt>)</span>
430
+
431
+
432
+
433
+ &mdash;
434
+ <div class='inline'><p>The language name.</p>
435
+ </div>
436
+
437
+ </li>
438
+
439
+ </ul>
440
+
441
+ </div><table class="source_code">
442
+ <tr>
443
+ <td>
444
+ <pre class="lines">
445
+
446
+
447
+ 14
448
+ 15
449
+ 16
450
+ 17
451
+ 18
452
+ 19
453
+ 20
454
+ 21
455
+ 22
456
+ 23
457
+ 24
458
+ 25
459
+ 26
460
+ 27</pre>
461
+ </td>
462
+ <td>
463
+ <pre class="code"><span class="info file"># File 'lib/brauser/definitions/language.rb', line 14</span>
464
+
465
+ <span class='kw'>class</span> <span class='const'>Language</span> <span class='op'>&lt;</span> <span class='const'>Base</span>
466
+ <span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:code</span><span class='comma'>,</span> <span class='symbol'>:name</span>
467
+
468
+ <span class='comment'># Creates a new definition.
469
+ </span> <span class='comment'>#
470
+ </span> <span class='comment'># @param code [String] The language code.
471
+ </span> <span class='comment'># @param name [String] The language name.
472
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_code'>code</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid__'>_</span><span class='rparen'>)</span>
473
+ <span class='id identifier rubyid_code'>code</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>_</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
474
+ <span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
475
+ <span class='ivar'>@code</span> <span class='op'>=</span> <span class='id identifier rubyid_code'>code</span>
476
+ <span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
477
+ <span class='kw'>end</span>
478
+ <span class='kw'>end</span></pre>
479
+ </td>
480
+ </tr>
481
+ </table>
482
+ </div>
483
+
484
+ </div>
485
+
486
+
487
+ </div>
488
+
489
+ <div id="footer">
490
+ Generated on Mon Sep 29 16:43:32 2014 by
491
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
492
+ 0.8.7.4 (ruby-2.1.3).
493
+ </div>
494
+
495
+ </body>
496
+ </html>