brauser 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis-gemfile +2 -2
- data/.travis.yml +1 -3
- data/.yardopts +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile +3 -3
- data/README.md +30 -2
- data/Rakefile +14 -2
- data/brauser.gemspec +1 -1
- data/doc/Brauser.html +3 -3
- data/doc/Brauser/Browser.html +2208 -1908
- data/doc/Brauser/Definitions.html +29 -25
- data/doc/Brauser/Definitions/Base.html +18 -16
- data/doc/Brauser/Definitions/Browser.html +215 -210
- data/doc/Brauser/Definitions/Language.html +40 -37
- data/doc/Brauser/Definitions/Platform.html +74 -70
- data/doc/Brauser/Hooks.html +4 -4
- data/doc/Brauser/Hooks/RubyOnRails.html +12 -10
- data/doc/Brauser/Parser.html +27 -24
- data/doc/Brauser/Value.html +44 -40
- data/doc/Brauser/Version.html +11 -7
- data/doc/_index.html +4 -4
- data/doc/class_list.html +5 -1
- data/doc/file.README.html +77 -50
- data/doc/file_list.html +5 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +77 -50
- data/doc/js/full_list.js +4 -1
- data/doc/method_list.html +31 -21
- data/doc/top-level-namespace.html +3 -3
- data/lib/brauser/browser.rb +15 -5
- data/lib/brauser/definitions/platform.rb +1 -1
- data/lib/brauser/hooks.rb +1 -1
- data/lib/brauser/version.rb +1 -1
- data/spec/brauser/browser_spec.rb +14 -0
- data/spec/spec_helper.rb +1 -8
- metadata +5 -5
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Brauser::Definitions::Language
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -303,12 +303,13 @@
|
|
303
303
|
<td>
|
304
304
|
<pre class="code"><span class="info file"># File 'lib/brauser/definitions/language.rb', line 21</span>
|
305
305
|
|
306
|
-
<span class='kw'>def</span> <span class='
|
307
|
-
<span class='
|
308
|
-
<span class='ivar'>@id</span> <span class='
|
309
|
-
<span class='ivar'>@code</span> <span class='
|
310
|
-
<span class='ivar'>@name</span> <span class='
|
311
|
-
<span class='kw'>end</span
|
306
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_code identifier id'>code</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span><span class='comma token'>,</span> <span class='pow op'>**</span><span class='rubyid__ identifier id'>_</span><span class='rparen token'>)</span>
|
307
|
+
<span class='rubyid_code identifier id'>code</span> <span class='assign token'>=</span> <span class='rubyid_code identifier id'>code</span><span class='dot token'>.</span><span class='rubyid_downcase identifier id'>downcase</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>"_"</span><span class='comma token'>,</span> <span class='string val'>"-"</span><span class='rparen token'>)</span>
|
308
|
+
<span class='rubyid_@id ivar id'>@id</span> <span class='assign token'>=</span> <span class='rubyid_code identifier id'>code</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span>
|
309
|
+
<span class='rubyid_@code ivar id'>@code</span> <span class='assign token'>=</span> <span class='rubyid_code identifier id'>code</span>
|
310
|
+
<span class='rubyid_@name ivar id'>@name</span> <span class='assign token'>=</span> <span class='rubyid_name identifier id'>name</span>
|
311
|
+
<span class='rubyid_end end kw'>end</span>
|
312
|
+
</pre>
|
312
313
|
</td>
|
313
314
|
</tr>
|
314
315
|
</table>
|
@@ -381,20 +382,21 @@
|
|
381
382
|
<td>
|
382
383
|
<pre class="code"><span class="info file"># File 'lib/brauser/definitions/language.rb', line 14</span>
|
383
384
|
|
384
|
-
<span class='kw'>class</span> <span class='
|
385
|
-
<span class='
|
386
|
-
|
387
|
-
<span class='comment'># Creates a new definition
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
<span class='
|
393
|
-
<span class='ivar'>@id</span> <span class='
|
394
|
-
<span class='ivar'>@code</span> <span class='
|
395
|
-
<span class='ivar'>@name</span> <span class='
|
396
|
-
<span class='kw'>end</span>
|
397
|
-
<span class='kw'>end</span
|
385
|
+
<span class='rubyid_class class kw'>class</span> <span class='rubyid_Language constant id'>Language</span> <span class='lt op'><</span> <span class='rubyid_Base constant id'>Base</span>
|
386
|
+
<span class='rubyid_attr_reader identifier id'>attr_reader</span> <span class='symbol val'>:code</span><span class='comma token'>,</span> <span class='symbol val'>:name</span>
|
387
|
+
|
388
|
+
<span class='comment val'># Creates a new definition.</span>
|
389
|
+
<span class='comment val'>#</span>
|
390
|
+
<span class='comment val'># @param code [String] The language code.</span>
|
391
|
+
<span class='comment val'># @param name [String] The language name.</span>
|
392
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_code identifier id'>code</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span><span class='comma token'>,</span> <span class='pow op'>**</span><span class='rubyid__ identifier id'>_</span><span class='rparen token'>)</span>
|
393
|
+
<span class='rubyid_code identifier id'>code</span> <span class='assign token'>=</span> <span class='rubyid_code identifier id'>code</span><span class='dot token'>.</span><span class='rubyid_downcase identifier id'>downcase</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>"_"</span><span class='comma token'>,</span> <span class='string val'>"-"</span><span class='rparen token'>)</span>
|
394
|
+
<span class='rubyid_@id ivar id'>@id</span> <span class='assign token'>=</span> <span class='rubyid_code identifier id'>code</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span>
|
395
|
+
<span class='rubyid_@code ivar id'>@code</span> <span class='assign token'>=</span> <span class='rubyid_code identifier id'>code</span>
|
396
|
+
<span class='rubyid_@name ivar id'>@name</span> <span class='assign token'>=</span> <span class='rubyid_name identifier id'>name</span>
|
397
|
+
<span class='rubyid_end end kw'>end</span>
|
398
|
+
<span class='rubyid_end end kw'>end</span>
|
399
|
+
</pre>
|
398
400
|
</td>
|
399
401
|
</tr>
|
400
402
|
</table>
|
@@ -462,20 +464,21 @@
|
|
462
464
|
<td>
|
463
465
|
<pre class="code"><span class="info file"># File 'lib/brauser/definitions/language.rb', line 14</span>
|
464
466
|
|
465
|
-
<span class='kw'>class</span> <span class='
|
466
|
-
<span class='
|
467
|
-
|
468
|
-
<span class='comment'># Creates a new definition
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
<span class='
|
474
|
-
<span class='ivar'>@id</span> <span class='
|
475
|
-
<span class='ivar'>@code</span> <span class='
|
476
|
-
<span class='ivar'>@name</span> <span class='
|
477
|
-
<span class='kw'>end</span>
|
478
|
-
<span class='kw'>end</span
|
467
|
+
<span class='rubyid_class class kw'>class</span> <span class='rubyid_Language constant id'>Language</span> <span class='lt op'><</span> <span class='rubyid_Base constant id'>Base</span>
|
468
|
+
<span class='rubyid_attr_reader identifier id'>attr_reader</span> <span class='symbol val'>:code</span><span class='comma token'>,</span> <span class='symbol val'>:name</span>
|
469
|
+
|
470
|
+
<span class='comment val'># Creates a new definition.</span>
|
471
|
+
<span class='comment val'>#</span>
|
472
|
+
<span class='comment val'># @param code [String] The language code.</span>
|
473
|
+
<span class='comment val'># @param name [String] The language name.</span>
|
474
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_code identifier id'>code</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span><span class='comma token'>,</span> <span class='pow op'>**</span><span class='rubyid__ identifier id'>_</span><span class='rparen token'>)</span>
|
475
|
+
<span class='rubyid_code identifier id'>code</span> <span class='assign token'>=</span> <span class='rubyid_code identifier id'>code</span><span class='dot token'>.</span><span class='rubyid_downcase identifier id'>downcase</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>"_"</span><span class='comma token'>,</span> <span class='string val'>"-"</span><span class='rparen token'>)</span>
|
476
|
+
<span class='rubyid_@id ivar id'>@id</span> <span class='assign token'>=</span> <span class='rubyid_code identifier id'>code</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span>
|
477
|
+
<span class='rubyid_@code ivar id'>@code</span> <span class='assign token'>=</span> <span class='rubyid_code identifier id'>code</span>
|
478
|
+
<span class='rubyid_@name ivar id'>@name</span> <span class='assign token'>=</span> <span class='rubyid_name identifier id'>name</span>
|
479
|
+
<span class='rubyid_end end kw'>end</span>
|
480
|
+
<span class='rubyid_end end kw'>end</span>
|
481
|
+
</pre>
|
479
482
|
</td>
|
480
483
|
</tr>
|
481
484
|
</table>
|
@@ -487,9 +490,9 @@
|
|
487
490
|
</div>
|
488
491
|
|
489
492
|
<div id="footer">
|
490
|
-
Generated on Mon
|
493
|
+
Generated on Mon Mar 2 13:10:31 2015 by
|
491
494
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
492
|
-
0.8.7.
|
495
|
+
0.8.7.6 (ruby-2.2.0).
|
493
496
|
</div>
|
494
497
|
|
495
498
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Brauser::Definitions::Platform
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -314,7 +314,7 @@
|
|
314
314
|
|
315
315
|
|
316
316
|
—
|
317
|
-
<div class='inline'><p>The pattern or the block to recognize the platform. <strong>
|
317
|
+
<div class='inline'><p>The pattern or the block to recognize the platform. <strong>Ignored if a block is given.</strong></p>
|
318
318
|
</div>
|
319
319
|
|
320
320
|
</li>
|
@@ -337,11 +337,12 @@
|
|
337
337
|
<td>
|
338
338
|
<pre class="code"><span class="info file"># File 'lib/brauser/definitions/platform.rb', line 22</span>
|
339
339
|
|
340
|
-
<span class='kw'>def</span> <span class='
|
341
|
-
<span class='ivar'>@id</span> <span class='
|
342
|
-
<span class='ivar'>@name</span> <span class='
|
343
|
-
<span class='ivar'>@matcher</span> <span class='
|
344
|
-
<span class='kw'>end</span
|
340
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_id identifier id'>id</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span><span class='comma token'>,</span> <span class='rubyid_matcher identifier id'>matcher</span> <span class='assign token'>=</span> <span class='regexp val'>/.*/</span><span class='comma token'>,</span> <span class='pow op'>**</span><span class='rubyid__ identifier id'>_</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
|
341
|
+
<span class='rubyid_@id ivar id'>@id</span> <span class='assign token'>=</span> <span class='rubyid_id identifier id'>id</span>
|
342
|
+
<span class='rubyid_@name ivar id'>@name</span> <span class='assign token'>=</span> <span class='rubyid_name identifier id'>name</span>
|
343
|
+
<span class='rubyid_@matcher ivar id'>@matcher</span> <span class='assign token'>=</span> <span class='rubyid_block identifier id'>block</span> <span class='integer val'>? </span><span class='rubyid_block identifier id'>block</span> <span class='colon op'>:</span> <span class='rubyid_matcher identifier id'>matcher</span>
|
344
|
+
<span class='rubyid_end end kw'>end</span>
|
345
|
+
</pre>
|
345
346
|
</td>
|
346
347
|
</tr>
|
347
348
|
</table>
|
@@ -427,33 +428,34 @@
|
|
427
428
|
<td>
|
428
429
|
<pre class="code"><span class="info file"># File 'lib/brauser/definitions/platform.rb', line 14</span>
|
429
430
|
|
430
|
-
<span class='kw'>class</span> <span class='
|
431
|
-
<span class='
|
432
|
-
|
433
|
-
<span class='comment'># Creates a new definition
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
<span class='ivar'>@id</span> <span class='
|
440
|
-
<span class='ivar'>@name</span> <span class='
|
441
|
-
<span class='ivar'>@matcher</span> <span class='
|
442
|
-
<span class='kw'>end</span>
|
443
|
-
|
444
|
-
<span class='comment'># Matches against an header
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
<span class='kw'>if</span> <span class='ivar'>@matcher</span><span class='
|
451
|
-
<span class='ivar'>@matcher</span><span class='
|
452
|
-
<span class='kw'>else</span>
|
453
|
-
<span class='ivar'>@matcher</span><span class='
|
454
|
-
<span class='kw'>end</span>
|
455
|
-
<span class='kw'>end</span>
|
456
|
-
<span class='kw'>end</span
|
431
|
+
<span class='rubyid_class class kw'>class</span> <span class='rubyid_Platform constant id'>Platform</span> <span class='lt op'><</span> <span class='rubyid_Base constant id'>Base</span>
|
432
|
+
<span class='rubyid_attr_reader identifier id'>attr_reader</span> <span class='symbol val'>:name</span><span class='comma token'>,</span> <span class='symbol val'>:matcher</span>
|
433
|
+
|
434
|
+
<span class='comment val'># Creates a new definition.</span>
|
435
|
+
<span class='comment val'>#</span>
|
436
|
+
<span class='comment val'># @param id [Symbol] The platform id.</span>
|
437
|
+
<span class='comment val'># @param name [String] The platform name.</span>
|
438
|
+
<span class='comment val'># @param matcher [Regexp|Proc] The pattern or the block to recognize the platform. **Ignored if a block is given.**</span>
|
439
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_id identifier id'>id</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span><span class='comma token'>,</span> <span class='rubyid_matcher identifier id'>matcher</span> <span class='assign token'>=</span> <span class='regexp val'>/.*/</span><span class='comma token'>,</span> <span class='pow op'>**</span><span class='rubyid__ identifier id'>_</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
|
440
|
+
<span class='rubyid_@id ivar id'>@id</span> <span class='assign token'>=</span> <span class='rubyid_id identifier id'>id</span>
|
441
|
+
<span class='rubyid_@name ivar id'>@name</span> <span class='assign token'>=</span> <span class='rubyid_name identifier id'>name</span>
|
442
|
+
<span class='rubyid_@matcher ivar id'>@matcher</span> <span class='assign token'>=</span> <span class='rubyid_block identifier id'>block</span> <span class='integer val'>? </span><span class='rubyid_block identifier id'>block</span> <span class='colon op'>:</span> <span class='rubyid_matcher identifier id'>matcher</span>
|
443
|
+
<span class='rubyid_end end kw'>end</span>
|
444
|
+
|
445
|
+
<span class='comment val'># Matches against an header.</span>
|
446
|
+
<span class='comment val'>#</span>
|
447
|
+
<span class='comment val'># @param header [String] The header to match.</span>
|
448
|
+
<span class='comment val'># @param engine [Symbol] The engine to match.</span>
|
449
|
+
<span class='comment val'># @return [Boolean|NilClass] True if match succeeded, `false` or `nil` otherwise.</span>
|
450
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='comma token'>,</span> <span class='rubyid_engine identifier id'>engine</span><span class='rparen token'>)</span>
|
451
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_@matcher ivar id'>@matcher</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='rubyid_Regexp constant id'>Regexp</span><span class='rparen token'>)</span>
|
452
|
+
<span class='rubyid_@matcher ivar id'>@matcher</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='rparen token'>)</span>
|
453
|
+
<span class='rubyid_else else kw'>else</span>
|
454
|
+
<span class='rubyid_@matcher ivar id'>@matcher</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='comma token'>,</span> <span class='rubyid_engine identifier id'>engine</span><span class='rparen token'>)</span>
|
455
|
+
<span class='rubyid_end end kw'>end</span>
|
456
|
+
<span class='rubyid_end end kw'>end</span>
|
457
|
+
<span class='rubyid_end end kw'>end</span>
|
458
|
+
</pre>
|
457
459
|
</td>
|
458
460
|
</tr>
|
459
461
|
</table>
|
@@ -534,33 +536,34 @@
|
|
534
536
|
<td>
|
535
537
|
<pre class="code"><span class="info file"># File 'lib/brauser/definitions/platform.rb', line 14</span>
|
536
538
|
|
537
|
-
<span class='kw'>class</span> <span class='
|
538
|
-
<span class='
|
539
|
-
|
540
|
-
<span class='comment'># Creates a new definition
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
<span class='ivar'>@id</span> <span class='
|
547
|
-
<span class='ivar'>@name</span> <span class='
|
548
|
-
<span class='ivar'>@matcher</span> <span class='
|
549
|
-
<span class='kw'>end</span>
|
550
|
-
|
551
|
-
<span class='comment'># Matches against an header
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
<span class='kw'>if</span> <span class='ivar'>@matcher</span><span class='
|
558
|
-
<span class='ivar'>@matcher</span><span class='
|
559
|
-
<span class='kw'>else</span>
|
560
|
-
<span class='ivar'>@matcher</span><span class='
|
561
|
-
<span class='kw'>end</span>
|
562
|
-
<span class='kw'>end</span>
|
563
|
-
<span class='kw'>end</span
|
539
|
+
<span class='rubyid_class class kw'>class</span> <span class='rubyid_Platform constant id'>Platform</span> <span class='lt op'><</span> <span class='rubyid_Base constant id'>Base</span>
|
540
|
+
<span class='rubyid_attr_reader identifier id'>attr_reader</span> <span class='symbol val'>:name</span><span class='comma token'>,</span> <span class='symbol val'>:matcher</span>
|
541
|
+
|
542
|
+
<span class='comment val'># Creates a new definition.</span>
|
543
|
+
<span class='comment val'>#</span>
|
544
|
+
<span class='comment val'># @param id [Symbol] The platform id.</span>
|
545
|
+
<span class='comment val'># @param name [String] The platform name.</span>
|
546
|
+
<span class='comment val'># @param matcher [Regexp|Proc] The pattern or the block to recognize the platform. **Ignored if a block is given.**</span>
|
547
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_id identifier id'>id</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span><span class='comma token'>,</span> <span class='rubyid_matcher identifier id'>matcher</span> <span class='assign token'>=</span> <span class='regexp val'>/.*/</span><span class='comma token'>,</span> <span class='pow op'>**</span><span class='rubyid__ identifier id'>_</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
|
548
|
+
<span class='rubyid_@id ivar id'>@id</span> <span class='assign token'>=</span> <span class='rubyid_id identifier id'>id</span>
|
549
|
+
<span class='rubyid_@name ivar id'>@name</span> <span class='assign token'>=</span> <span class='rubyid_name identifier id'>name</span>
|
550
|
+
<span class='rubyid_@matcher ivar id'>@matcher</span> <span class='assign token'>=</span> <span class='rubyid_block identifier id'>block</span> <span class='integer val'>? </span><span class='rubyid_block identifier id'>block</span> <span class='colon op'>:</span> <span class='rubyid_matcher identifier id'>matcher</span>
|
551
|
+
<span class='rubyid_end end kw'>end</span>
|
552
|
+
|
553
|
+
<span class='comment val'># Matches against an header.</span>
|
554
|
+
<span class='comment val'>#</span>
|
555
|
+
<span class='comment val'># @param header [String] The header to match.</span>
|
556
|
+
<span class='comment val'># @param engine [Symbol] The engine to match.</span>
|
557
|
+
<span class='comment val'># @return [Boolean|NilClass] True if match succeeded, `false` or `nil` otherwise.</span>
|
558
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='comma token'>,</span> <span class='rubyid_engine identifier id'>engine</span><span class='rparen token'>)</span>
|
559
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_@matcher ivar id'>@matcher</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='rubyid_Regexp constant id'>Regexp</span><span class='rparen token'>)</span>
|
560
|
+
<span class='rubyid_@matcher ivar id'>@matcher</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='rparen token'>)</span>
|
561
|
+
<span class='rubyid_else else kw'>else</span>
|
562
|
+
<span class='rubyid_@matcher ivar id'>@matcher</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='comma token'>,</span> <span class='rubyid_engine identifier id'>engine</span><span class='rparen token'>)</span>
|
563
|
+
<span class='rubyid_end end kw'>end</span>
|
564
|
+
<span class='rubyid_end end kw'>end</span>
|
565
|
+
<span class='rubyid_end end kw'>end</span>
|
566
|
+
</pre>
|
564
567
|
</td>
|
565
568
|
</tr>
|
566
569
|
</table>
|
@@ -660,13 +663,14 @@
|
|
660
663
|
<td>
|
661
664
|
<pre class="code"><span class="info file"># File 'lib/brauser/definitions/platform.rb', line 33</span>
|
662
665
|
|
663
|
-
<span class='kw'>def</span> <span class='
|
664
|
-
<span class='kw'>if</span> <span class='ivar'>@matcher</span><span class='
|
665
|
-
<span class='ivar'>@matcher</span><span class='
|
666
|
-
<span class='kw'>else</span>
|
667
|
-
<span class='ivar'>@matcher</span><span class='
|
668
|
-
<span class='kw'>end</span>
|
669
|
-
<span class='kw'>end</span
|
666
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='comma token'>,</span> <span class='rubyid_engine identifier id'>engine</span><span class='rparen token'>)</span>
|
667
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_@matcher ivar id'>@matcher</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='rubyid_Regexp constant id'>Regexp</span><span class='rparen token'>)</span>
|
668
|
+
<span class='rubyid_@matcher ivar id'>@matcher</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='rparen token'>)</span>
|
669
|
+
<span class='rubyid_else else kw'>else</span>
|
670
|
+
<span class='rubyid_@matcher ivar id'>@matcher</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='comma token'>,</span> <span class='rubyid_engine identifier id'>engine</span><span class='rparen token'>)</span>
|
671
|
+
<span class='rubyid_end end kw'>end</span>
|
672
|
+
<span class='rubyid_end end kw'>end</span>
|
673
|
+
</pre>
|
670
674
|
</td>
|
671
675
|
</tr>
|
672
676
|
</table>
|
@@ -677,9 +681,9 @@
|
|
677
681
|
</div>
|
678
682
|
|
679
683
|
<div id="footer">
|
680
|
-
Generated on Mon
|
684
|
+
Generated on Mon Mar 2 13:10:31 2015 by
|
681
685
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
682
|
-
0.8.7.
|
686
|
+
0.8.7.6 (ruby-2.2.0).
|
683
687
|
</div>
|
684
688
|
|
685
689
|
</body>
|
data/doc/Brauser/Hooks.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Brauser::Hooks
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -86,7 +86,7 @@
|
|
86
86
|
|
87
87
|
<h2>Overview</h2><div class="docstring">
|
88
88
|
<div class="discussion">
|
89
|
-
<p>A set of
|
89
|
+
<p>A set of hooks for adding brauser to web frameworks.</p>
|
90
90
|
|
91
91
|
|
92
92
|
</div>
|
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on Mon
|
119
|
+
Generated on Mon Mar 2 13:10:31 2015 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
-
0.8.7.
|
121
|
+
0.8.7.6 (ruby-2.2.0).
|
122
122
|
</div>
|
123
123
|
|
124
124
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Brauser::Hooks::RubyOnRails
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -224,9 +224,10 @@
|
|
224
224
|
<td>
|
225
225
|
<pre class="code"><span class="info file"># File 'lib/brauser/hooks.rb', line 14</span>
|
226
226
|
|
227
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='
|
228
|
-
<span class='
|
229
|
-
<span class='kw'>end</span
|
227
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_included identifier id'>included</span><span class='lparen token'>(</span><span class='rubyid_base identifier id'>base</span><span class='rparen token'>)</span>
|
228
|
+
<span class='rubyid_base identifier id'>base</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='symbol val'>:helper_method</span><span class='comma token'>,</span> <span class='symbol val'>:browser</span><span class='rparen token'>)</span>
|
229
|
+
<span class='rubyid_end end kw'>end</span>
|
230
|
+
</pre>
|
230
231
|
</td>
|
231
232
|
</tr>
|
232
233
|
</table>
|
@@ -309,10 +310,11 @@
|
|
309
310
|
<td>
|
310
311
|
<pre class="code"><span class="info file"># File 'lib/brauser/hooks.rb', line 22</span>
|
311
312
|
|
312
|
-
<span class='kw'>def</span> <span class='
|
313
|
-
<span class='ivar'>@browser</span> <span class='
|
314
|
-
<span class='ivar'>@browser</span> <span class='op'>||=</span> <span class='op'>::</span><span class='
|
315
|
-
<span class='kw'>end</span
|
313
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_browser identifier id'>browser</span><span class='lparen token'>(</span><span class='rubyid_force identifier id'>force</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span><span class='rparen token'>)</span>
|
314
|
+
<span class='rubyid_@browser ivar id'>@browser</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_force identifier id'>force</span>
|
315
|
+
<span class='rubyid_@browser ivar id'>@browser</span> <span class='opasgn op'>||=</span> <span class='colon3 op'>::</span><span class='rubyid_Brauser constant id'>Brauser</span><span class='colon2 op'>::</span><span class='rubyid_Browser constant id'>Browser</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_request identifier id'>request</span><span class='dot token'>.</span><span class='rubyid_headers identifier id'>headers</span><span class='lbrack token'>[</span><span class='string val'>"User-Agent"</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='rubyid_request identifier id'>request</span><span class='dot token'>.</span><span class='rubyid_headers identifier id'>headers</span><span class='lbrack token'>[</span><span class='string val'>"Accept-Language"</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
|
316
|
+
<span class='rubyid_end end kw'>end</span>
|
317
|
+
</pre>
|
316
318
|
</td>
|
317
319
|
</tr>
|
318
320
|
</table>
|
@@ -323,9 +325,9 @@
|
|
323
325
|
</div>
|
324
326
|
|
325
327
|
<div id="footer">
|
326
|
-
Generated on Mon
|
328
|
+
Generated on Mon Mar 2 13:10:31 2015 by
|
327
329
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
328
|
-
0.8.7.
|
330
|
+
0.8.7.6 (ruby-2.2.0).
|
329
331
|
</div>
|
330
332
|
|
331
333
|
</body>
|
data/doc/Brauser/Parser.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Brauser::Parser
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -309,9 +309,10 @@
|
|
309
309
|
<td>
|
310
310
|
<pre class="code"><span class="info file"># File 'lib/brauser/parser.rb', line 15</span>
|
311
311
|
|
312
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='
|
313
|
-
<span class='
|
314
|
-
<span class='kw'>end</span
|
312
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_disambiguate identifier id'>disambiguate</span><span class='lparen token'>(</span><span class='rubyid_subject identifier id'>subject</span><span class='comma token'>,</span> <span class='rubyid_positive_matcher identifier id'>positive_matcher</span><span class='comma token'>,</span> <span class='rubyid_negative_matcher identifier id'>negative_matcher</span><span class='rparen token'>)</span>
|
313
|
+
<span class='rubyid_subject identifier id'>subject</span> <span class='match op'>=~</span> <span class='rubyid_positive_matcher identifier id'>positive_matcher</span> <span class='andop op'>&&</span> <span class='rubyid_subject identifier id'>subject</span> <span class='nmatch op'>!~</span> <span class='rubyid_negative_matcher identifier id'>negative_matcher</span>
|
314
|
+
<span class='rubyid_end end kw'>end</span>
|
315
|
+
</pre>
|
315
316
|
</td>
|
316
317
|
</tr>
|
317
318
|
</table>
|
@@ -395,13 +396,14 @@
|
|
395
396
|
<td>
|
396
397
|
<pre class="code"><span class="info file"># File 'lib/brauser/parser.rb', line 39</span>
|
397
398
|
|
398
|
-
<span class='kw'>def</span> <span class='
|
399
|
-
<span class='
|
400
|
-
<span class='
|
401
|
-
<span class='
|
402
|
-
<span class='
|
403
|
-
<span class='rbrace'>}</span>
|
404
|
-
<span class='kw'>end</span
|
399
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_parse_accept_language identifier id'>parse_accept_language</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='rparen token'>)</span>
|
400
|
+
<span class='rubyid_header identifier id'>header</span><span class='dot token'>.</span><span class='rubyid_ensure_string identifier id'>ensure_string</span><span class='dot token'>.</span><span class='rubyid_tokenize identifier id'>tokenize</span><span class='dot token'>.</span><span class='rubyid_reduce identifier id'>reduce</span><span class='lparen token'>(</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_rv identifier id'>rv</span><span class='comma token'>,</span> <span class='rubyid_token identifier id'>token</span><span class='bitor op'>|</span>
|
401
|
+
<span class='rubyid_code identifier id'>code</span><span class='comma token'>,</span> <span class='rubyid_priority identifier id'>priority</span> <span class='assign token'>=</span> <span class='rubyid_token identifier id'>token</span><span class='dot token'>.</span><span class='rubyid_split identifier id'>split</span><span class='lparen token'>(</span><span class='string val'>";q="</span><span class='rparen token'>)</span>
|
402
|
+
<span class='rubyid_rv identifier id'>rv</span><span class='lbrack token'>[</span><span class='rubyid_code identifier id'>code</span><span class='dot token'>.</span><span class='rubyid_downcase identifier id'>downcase</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>"_"</span><span class='comma token'>,</span> <span class='string val'>"-"</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_priority identifier id'>priority</span><span class='dot token'>.</span><span class='rubyid_to_float identifier id'>to_float</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_code identifier id'>code</span> <span class='andop op'>&&</span> <span class='rubyid_priority identifier id'>priority</span>
|
403
|
+
<span class='rubyid_rv identifier id'>rv</span>
|
404
|
+
<span class='rbrace token'>}</span>
|
405
|
+
<span class='rubyid_end end kw'>end</span>
|
406
|
+
</pre>
|
405
407
|
</td>
|
406
408
|
</tr>
|
407
409
|
</table>
|
@@ -483,17 +485,18 @@
|
|
483
485
|
<td>
|
484
486
|
<pre class="code"><span class="info file"># File 'lib/brauser/parser.rb', line 23</span>
|
485
487
|
|
486
|
-
<span class='kw'>def</span> <span class='
|
487
|
-
<span class='comment'># First of all match the agent and the version
|
488
|
-
|
489
|
-
<span class='
|
490
|
-
<span class='
|
491
|
-
<span class='
|
492
|
-
<span class='kw'>end</span>
|
493
|
-
|
494
|
-
<span class='kw'>nil</span>
|
495
|
-
<span class='rbrace'>}</span>
|
496
|
-
<span class='kw'>end</span
|
488
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_parse_agent identifier id'>parse_agent</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='rparen token'>)</span>
|
489
|
+
<span class='comment val'># First of all match the agent and the version</span>
|
490
|
+
<span class='rubyid_catch identifier id'>catch</span><span class='lparen token'>(</span><span class='symbol val'>:result</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span>
|
491
|
+
<span class='rubyid_Brauser constant id'>Brauser</span><span class='colon2 op'>::</span><span class='rubyid_Definitions constant id'>Definitions</span><span class='dot token'>.</span><span class='rubyid_browsers identifier id'>browsers</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid__ identifier id'>_</span><span class='comma token'>,</span> <span class='rubyid_definition identifier id'>definition</span><span class='bitor op'>|</span>
|
492
|
+
<span class='rubyid_result identifier id'>result</span> <span class='assign token'>=</span> <span class='rubyid_definition identifier id'>definition</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_header identifier id'>header</span><span class='rparen token'>)</span>
|
493
|
+
<span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:result</span><span class='comma token'>,</span> <span class='rubyid_result identifier id'>result</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_result identifier id'>result</span>
|
494
|
+
<span class='rubyid_end end kw'>end</span>
|
495
|
+
|
496
|
+
<span class='rubyid_nil nil kw'>nil</span>
|
497
|
+
<span class='rbrace token'>}</span>
|
498
|
+
<span class='rubyid_end end kw'>end</span>
|
499
|
+
</pre>
|
497
500
|
</td>
|
498
501
|
</tr>
|
499
502
|
</table>
|
@@ -504,9 +507,9 @@
|
|
504
507
|
</div>
|
505
508
|
|
506
509
|
<div id="footer">
|
507
|
-
Generated on Mon
|
510
|
+
Generated on Mon Mar 2 13:10:31 2015 by
|
508
511
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
509
|
-
0.8.7.
|
512
|
+
0.8.7.6 (ruby-2.2.0).
|
510
513
|
</div>
|
511
514
|
|
512
515
|
</body>
|