brauser 3.2.6 → 3.3.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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +29 -0
- data/.travis-gemfile +1 -1
- data/.travis.yml +2 -1
- data/Gemfile +3 -3
- data/README.md +6 -6
- data/brauser.gemspec +1 -1
- data/doc/Brauser.html +7 -7
- data/doc/Brauser/Browseable.html +127 -0
- data/doc/Brauser/{BrowserMethods → Browseable}/Attributes.html +34 -30
- data/doc/Brauser/Browseable/DefaultDefinitions.html +387 -0
- data/doc/Brauser/{BrowserMethods → Browseable}/General.html +9 -9
- data/doc/Brauser/{BrowserMethods → Browseable}/General/ClassMethods.html +33 -33
- data/doc/Brauser/{BrowserMethods → Browseable}/Parsing.html +23 -23
- data/doc/Brauser/{BrowserMethods → Browseable}/PartialQuerying.html +59 -53
- data/doc/Brauser/{BrowserMethods → Browseable}/Querying.html +43 -37
- data/doc/Brauser/{BrowserMethods → Browseable}/Register.html +9 -9
- data/doc/Brauser/Browseable/Register/ClassMethods.html +516 -0
- data/doc/Brauser/Browser.html +787 -1362
- data/doc/Brauser/Definition.html +230 -40
- data/doc/Brauser/Hooks.html +4 -4
- data/doc/Brauser/Hooks/RubyOnRails.html +4 -4
- data/doc/Brauser/Query.html +53 -53
- data/doc/Brauser/{BrowserMethods.html → Queryable.html} +13 -11
- data/doc/Brauser/{Chainers.html → Queryable/Chainers.html} +51 -45
- data/doc/Brauser/{Queries.html → Queryable/Queries.html} +47 -41
- data/doc/Brauser/Version.html +6 -6
- data/doc/_index.html +41 -27
- data/doc/class_list.html +1 -1
- data/doc/css/style.css +1 -0
- data/doc/file.README.html +10 -10
- data/doc/frames.html +1 -1
- data/doc/index.html +10 -10
- data/doc/method_list.html +68 -74
- data/doc/top-level-namespace.html +4 -4
- data/lib/brauser.rb +14 -3
- data/lib/brauser/browseable/attributes.rb +95 -0
- data/lib/brauser/browseable/general.rb +104 -0
- data/lib/brauser/browseable/parsing.rb +127 -0
- data/lib/brauser/browseable/partial_querying.rb +116 -0
- data/lib/brauser/browseable/querying.rb +63 -0
- data/lib/brauser/browseable/register.rb +73 -0
- data/lib/brauser/browser.rb +34 -741
- data/lib/brauser/definition.rb +30 -5
- data/lib/brauser/definitions/browsers.rb +66 -0
- data/lib/brauser/definitions/languages.rb +130 -0
- data/lib/brauser/definitions/platforms.rb +30 -0
- data/lib/brauser/query.rb +4 -99
- data/lib/brauser/queryable/chainers.rb +56 -0
- data/lib/brauser/queryable/queries.rb +60 -0
- data/lib/brauser/version.rb +3 -2
- data/spec/brauser/browser_spec.rb +26 -29
- data/spec/brauser/query_spec.rb +15 -13
- metadata +30 -17
- data/.bundle/install.log +0 -106
- data/doc/Brauser/BrowserMethods/Register/ClassMethods.html +0 -770
@@ -4,9 +4,9 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Module: Brauser::
|
7
|
+
Module: Brauser::Browseable::General::ClassMethods
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../../../';
|
20
|
-
framesUrl = "../../../frames.html#!"
|
20
|
+
framesUrl = "../../../frames.html#!Brauser/Browseable/General/ClassMethods.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../../_index.html">Index (C)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../../Brauser.html" title="Brauser (module)">Brauser</a></span></span> » <span class='title'><span class='object_link'><a href="../../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../../Brauser.html" title="Brauser (module)">Brauser</a></span></span> » <span class='title'><span class='object_link'><a href="../../Browseable.html" title="Brauser::Browseable (module)">Browseable</a></span></span> » <span class='title'><span class='object_link'><a href="../General.html" title="Brauser::Browseable::General (module)">General</a></span></span>
|
36
36
|
»
|
37
37
|
<span class="title">ClassMethods</span>
|
38
38
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Module: Brauser::
|
66
|
+
<div id="content"><h1>Module: Brauser::Browseable::General::ClassMethods
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -79,7 +79,7 @@
|
|
79
79
|
|
80
80
|
|
81
81
|
<dt class="r1 last">Defined in:</dt>
|
82
|
-
<dd class="r1 last">lib/brauser/
|
82
|
+
<dd class="r1 last">lib/brauser/browseable/general.rb</dd>
|
83
83
|
|
84
84
|
</dl>
|
85
85
|
<div class="clear"></div>
|
@@ -254,12 +254,12 @@
|
|
254
254
|
<pre class="lines">
|
255
255
|
|
256
256
|
|
257
|
-
|
258
|
-
|
259
|
-
|
257
|
+
21
|
258
|
+
22
|
259
|
+
23</pre>
|
260
260
|
</td>
|
261
261
|
<td>
|
262
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
262
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/general.rb', line 21</span>
|
263
263
|
|
264
264
|
<span class='kw'>def</span> <span class='id identifier rubyid_browsers'>browsers</span>
|
265
265
|
<span class='ivar'>@definitions</span><span class='lbracket'>[</span><span class='symbol'>:browsers</span><span class='rbracket'>]</span>
|
@@ -366,25 +366,25 @@
|
|
366
366
|
<pre class="lines">
|
367
367
|
|
368
368
|
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
369
|
+
49
|
370
|
+
50
|
371
|
+
51
|
372
|
+
52
|
373
|
+
53
|
374
|
+
54
|
375
|
+
55
|
376
|
+
56
|
377
|
+
57
|
378
|
+
58
|
379
|
+
59</pre>
|
380
380
|
</td>
|
381
381
|
<td>
|
382
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
382
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/general.rb', line 49</span>
|
383
383
|
|
384
384
|
<span class='kw'>def</span> <span class='id identifier rubyid_compare_versions'>compare_versions</span><span class='lparen'>(</span><span class='id identifier rubyid_v1'>v1</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_operator'>operator</span> <span class='op'>=</span> <span class='symbol'>:eq</span><span class='comma'>,</span> <span class='id identifier rubyid_v2'>v2</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
385
385
|
<span class='id identifier rubyid_valid_results'>valid_results</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>lt:</span> <span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>lte:</span> <span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>eq:</span> <span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>gte:</span> <span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span> <span class='int'>1</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>gt:</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_operator'>operator</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
386
386
|
|
387
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_valid_results'>valid_results</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_v1'>v1</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
|
387
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_valid_results'>valid_results</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='id identifier rubyid_v1'>v1</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
|
388
388
|
<span class='id identifier rubyid_p1'>p1</span><span class='comma'>,</span> <span class='id identifier rubyid_p2'>p2</span> <span class='op'>=</span> <span class='id identifier rubyid_find_relevant_tokens'>find_relevant_tokens</span><span class='lparen'>(</span><span class='id identifier rubyid_v1'>v1</span><span class='comma'>,</span> <span class='id identifier rubyid_v2'>v2</span><span class='rparen'>)</span>
|
389
389
|
<span class='id identifier rubyid_p1'>p1</span><span class='comma'>,</span> <span class='id identifier rubyid_p2'>p2</span> <span class='op'>=</span> <span class='id identifier rubyid_normalize_tokens'>normalize_tokens</span><span class='lparen'>(</span><span class='id identifier rubyid_p1'>p1</span><span class='comma'>,</span> <span class='id identifier rubyid_p2'>p2</span><span class='rparen'>)</span>
|
390
390
|
<span class='id identifier rubyid_valid_results'>valid_results</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_p1'>p1</span> <span class='op'><=></span> <span class='id identifier rubyid_p2'>p2</span><span class='rparen'>)</span>
|
@@ -441,12 +441,12 @@
|
|
441
441
|
<pre class="lines">
|
442
442
|
|
443
443
|
|
444
|
-
|
445
|
-
|
446
|
-
|
444
|
+
39
|
445
|
+
40
|
446
|
+
41</pre>
|
447
447
|
</td>
|
448
448
|
<td>
|
449
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
449
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/general.rb', line 39</span>
|
450
450
|
|
451
451
|
<span class='kw'>def</span> <span class='id identifier rubyid_languages'>languages</span>
|
452
452
|
<span class='ivar'>@definitions</span><span class='lbracket'>[</span><span class='symbol'>:languages</span><span class='rbracket'>]</span>
|
@@ -500,12 +500,12 @@
|
|
500
500
|
<pre class="lines">
|
501
501
|
|
502
502
|
|
503
|
-
|
504
|
-
|
505
|
-
|
503
|
+
30
|
504
|
+
31
|
505
|
+
32</pre>
|
506
506
|
</td>
|
507
507
|
<td>
|
508
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
508
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/general.rb', line 30</span>
|
509
509
|
|
510
510
|
<span class='kw'>def</span> <span class='id identifier rubyid_platforms'>platforms</span>
|
511
511
|
<span class='ivar'>@definitions</span><span class='lbracket'>[</span><span class='symbol'>:platforms</span><span class='rbracket'>]</span>
|
@@ -520,9 +520,9 @@
|
|
520
520
|
</div>
|
521
521
|
|
522
522
|
<div id="footer">
|
523
|
-
Generated on
|
523
|
+
Generated on Sat May 10 13:59:11 2014 by
|
524
524
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
525
|
-
0.8.7.
|
525
|
+
0.8.7.4 (ruby-2.1.0).
|
526
526
|
</div>
|
527
527
|
|
528
528
|
</body>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Module: Brauser::
|
7
|
+
Module: Brauser::Browseable::Parsing
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!"
|
20
|
+
framesUrl = "../../frames.html#!Brauser/Browseable/Parsing.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../_index.html">Index (P)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../Brauser.html" title="Brauser (module)">Brauser</a></span></span> » <span class='title'><span class='object_link'><a href="../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Brauser.html" title="Brauser (module)">Brauser</a></span></span> » <span class='title'><span class='object_link'><a href="../Browseable.html" title="Brauser::Browseable (module)">Browseable</a></span></span>
|
36
36
|
»
|
37
37
|
<span class="title">Parsing</span>
|
38
38
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Module: Brauser::
|
66
|
+
<div id="content"><h1>Module: Brauser::Browseable::Parsing
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -83,7 +83,7 @@
|
|
83
83
|
|
84
84
|
|
85
85
|
<dt class="r2 last">Defined in:</dt>
|
86
|
-
<dd class="r2 last">lib/brauser/
|
86
|
+
<dd class="r2 last">lib/brauser/browseable/parsing.rb</dd>
|
87
87
|
|
88
88
|
</dl>
|
89
89
|
<div class="clear"></div>
|
@@ -231,15 +231,15 @@
|
|
231
231
|
<pre class="lines">
|
232
232
|
|
233
233
|
|
234
|
-
|
235
|
-
|
236
|
-
|
234
|
+
29
|
235
|
+
30
|
236
|
+
31</pre>
|
237
237
|
</td>
|
238
238
|
<td>
|
239
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
239
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/parsing.rb', line 29</span>
|
240
240
|
|
241
241
|
<span class='kw'>def</span> <span class='id identifier rubyid_parse_accept_language'>parse_accept_language</span><span class='lparen'>(</span><span class='id identifier rubyid_accept_language'>accept_language</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
242
|
-
<span class='id identifier rubyid_accept_language'>accept_language</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>;q=[\d.]+</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>,</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span
|
242
|
+
<span class='id identifier rubyid_accept_language'>accept_language</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>;q=[\d.]+</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>,</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_l'>l</span><span class='op'>|</span> <span class='id identifier rubyid_l'>l</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_l'>l</span><span class='op'>|</span> <span class='id identifier rubyid_l'>l</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='rbrace'>}</span>
|
243
243
|
<span class='kw'>end</span></pre>
|
244
244
|
</td>
|
245
245
|
</tr>
|
@@ -309,18 +309,18 @@
|
|
309
309
|
<pre class="lines">
|
310
310
|
|
311
311
|
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
312
|
+
15
|
313
|
+
16
|
314
|
+
17
|
315
|
+
18
|
316
|
+
19
|
317
|
+
20
|
318
|
+
21
|
319
|
+
22
|
320
|
+
23</pre>
|
321
321
|
</td>
|
322
322
|
<td>
|
323
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
323
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/parsing.rb', line 15</span>
|
324
324
|
|
325
325
|
<span class='kw'>def</span> <span class='id identifier rubyid_parse_agent'>parse_agent</span><span class='lparen'>(</span><span class='id identifier rubyid_agent'>agent</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
326
326
|
<span class='id identifier rubyid_agent'>agent</span> <span class='op'>=</span> <span class='id identifier rubyid_agent'>agent</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
|
@@ -341,9 +341,9 @@
|
|
341
341
|
</div>
|
342
342
|
|
343
343
|
<div id="footer">
|
344
|
-
Generated on
|
344
|
+
Generated on Sat May 10 13:59:11 2014 by
|
345
345
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
346
|
-
0.8.7.
|
346
|
+
0.8.7.4 (ruby-2.1.0).
|
347
347
|
</div>
|
348
348
|
|
349
349
|
</body>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Module: Brauser::
|
7
|
+
Module: Brauser::Browseable::PartialQuerying
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!"
|
20
|
+
framesUrl = "../../frames.html#!Brauser/Browseable/PartialQuerying.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<div id="menu">
|
33
33
|
|
34
34
|
<a href="../../_index.html">Index (P)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../Brauser.html" title="Brauser (module)">Brauser</a></span></span> » <span class='title'><span class='object_link'><a href="../
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Brauser.html" title="Brauser (module)">Brauser</a></span></span> » <span class='title'><span class='object_link'><a href="../Browseable.html" title="Brauser::Browseable (module)">Browseable</a></span></span>
|
36
36
|
»
|
37
37
|
<span class="title">PartialQuerying</span>
|
38
38
|
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Module: Brauser::
|
66
|
+
<div id="content"><h1>Module: Brauser::Browseable::PartialQuerying
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -83,7 +83,7 @@
|
|
83
83
|
|
84
84
|
|
85
85
|
<dt class="r2 last">Defined in:</dt>
|
86
|
-
<dd class="r2 last">lib/brauser/
|
86
|
+
<dd class="r2 last">lib/brauser/browseable/partial_querying.rb</dd>
|
87
87
|
|
88
88
|
</dl>
|
89
89
|
<div class="clear"></div>
|
@@ -185,10 +185,12 @@
|
|
185
185
|
<li class="public ">
|
186
186
|
<span class="summary_signature">
|
187
187
|
|
188
|
-
<a href="#
|
188
|
+
<a href="#version_equals_to-instance_method" title="#version_equals_to (instance method)">- (Query) <strong>version_equals_to</strong>(versions = {}) </a>
|
189
189
|
|
190
190
|
|
191
191
|
|
192
|
+
(also: #v)
|
193
|
+
|
192
194
|
</span>
|
193
195
|
|
194
196
|
|
@@ -277,17 +279,17 @@
|
|
277
279
|
<pre class="lines">
|
278
280
|
|
279
281
|
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
282
|
+
63
|
283
|
+
64
|
284
|
+
65
|
285
|
+
66
|
286
|
+
67</pre>
|
285
287
|
</td>
|
286
288
|
<td>
|
287
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
289
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/partial_querying.rb', line 63</span>
|
288
290
|
|
289
291
|
<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='id identifier rubyid_parse_accept_language'>parse_accept_language</span><span class='lparen'>(</span><span class='ivar'>@accept_language</span><span class='rparen'>)</span> <span class='kw'>
|
292
|
+
<span class='id identifier rubyid_parse_accept_language'>parse_accept_language</span><span class='lparen'>(</span><span class='ivar'>@accept_language</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@languages</span>
|
291
293
|
|
292
294
|
<span class='op'>::</span><span class='const'>Brauser</span><span class='op'>::</span><span class='const'>Query</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='ivar'>@languages</span> <span class='op'>&</span> <span class='id identifier rubyid_langs'>langs</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='symbol'>:to_s</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span><span class='rparen'>)</span>
|
293
295
|
<span class='kw'>end</span></pre>
|
@@ -391,7 +393,7 @@ in form <code>{:operator => version}</code>, where operator is one of <code>:
|
|
391
393
|
<p class="tag_title">See Also:</p>
|
392
394
|
<ul class="see">
|
393
395
|
|
394
|
-
<li>#
|
396
|
+
<li>#version?</li>
|
395
397
|
|
396
398
|
<li>#on?</li>
|
397
399
|
|
@@ -403,34 +405,34 @@ in form <code>{:operator => version}</code>, where operator is one of <code>:
|
|
403
405
|
<pre class="lines">
|
404
406
|
|
405
407
|
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
408
|
+
22
|
409
|
+
23
|
410
|
+
24
|
411
|
+
25
|
412
|
+
26
|
413
|
+
27
|
414
|
+
28
|
415
|
+
29
|
416
|
+
30
|
417
|
+
31
|
418
|
+
32
|
419
|
+
33
|
420
|
+
34</pre>
|
419
421
|
</td>
|
420
422
|
<td>
|
421
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
423
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/partial_querying.rb', line 22</span>
|
422
424
|
|
423
425
|
<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>
|
424
|
-
<span class='id identifier rubyid_parse_agent'>parse_agent</span><span class='lparen'>(</span><span class='ivar'>@agent</span><span class='rparen'>)</span> <span class='kw'>
|
426
|
+
<span class='id identifier rubyid_parse_agent'>parse_agent</span><span class='lparen'>(</span><span class='ivar'>@agent</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@name</span>
|
425
427
|
|
426
428
|
<span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='id identifier rubyid_adjust_names'>adjust_names</span><span class='lparen'>(</span><span class='id identifier rubyid_names'>names</span><span class='rparen'>)</span>
|
427
429
|
<span class='id identifier rubyid_versions'>versions</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_versions_query'>parse_versions_query</span><span class='lparen'>(</span><span class='id identifier rubyid_versions'>versions</span><span class='rparen'>)</span>
|
428
430
|
<span class='id identifier rubyid_platforms'>platforms</span> <span class='op'>=</span> <span class='id identifier rubyid_platforms'>platforms</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span>
|
429
431
|
|
430
432
|
<span class='op'>::</span><span class='const'>Brauser</span><span class='op'>::</span><span class='const'>Query</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span>
|
431
|
-
|
432
|
-
|
433
|
-
|
433
|
+
<span class='lparen'>(</span><span class='id identifier rubyid_names'>names</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_names'>names</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@name</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_check_capable'>check_capable</span><span class='lparen'>(</span><span class='id identifier rubyid_names'>names</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>&&</span>
|
434
|
+
<span class='lparen'>(</span><span class='id identifier rubyid_versions'>versions</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='op'>||</span> <span class='id identifier rubyid_version?'>version?</span><span class='lparen'>(</span><span class='id identifier rubyid_versions'>versions</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>&&</span>
|
435
|
+
<span class='lparen'>(</span><span class='id identifier rubyid_platforms'>platforms</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='op'>||</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='rparen'>)</span>
|
434
436
|
<span class='rparen'>)</span>
|
435
437
|
<span class='kw'>end</span></pre>
|
436
438
|
</td>
|
@@ -501,17 +503,17 @@ in form <code>{:operator => version}</code>, where operator is one of <code>:
|
|
501
503
|
<pre class="lines">
|
502
504
|
|
503
505
|
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
506
|
+
53
|
507
|
+
54
|
508
|
+
55
|
509
|
+
56
|
510
|
+
57</pre>
|
509
511
|
</td>
|
510
512
|
<td>
|
511
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
513
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/partial_querying.rb', line 53</span>
|
512
514
|
|
513
515
|
<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>
|
514
|
-
<span class='id identifier rubyid_parse_agent'>parse_agent</span><span class='lparen'>(</span><span class='ivar'>@agent</span><span class='rparen'>)</span> <span class='kw'>
|
516
|
+
<span class='id identifier rubyid_parse_agent'>parse_agent</span><span class='lparen'>(</span><span class='ivar'>@agent</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@platform</span>
|
515
517
|
|
516
518
|
<span class='op'>::</span><span class='const'>Brauser</span><span class='op'>::</span><span class='const'>Query</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_platforms'>platforms</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='op'>||</span> <span class='id identifier rubyid_platforms'>platforms</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='symbol'>:to_sym</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@platform</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
517
519
|
<span class='kw'>end</span></pre>
|
@@ -521,12 +523,16 @@ in form <code>{:operator => version}</code>, where operator is one of <code>:
|
|
521
523
|
</div>
|
522
524
|
|
523
525
|
<div class="method_details ">
|
524
|
-
<h3 class="signature " id="
|
526
|
+
<h3 class="signature " id="version_equals_to-instance_method">
|
525
527
|
|
526
|
-
- (<tt><span class='object_link'><a href="../Query.html" title="Brauser::Query (class)">Query</a></span></tt>) <strong>
|
528
|
+
- (<tt><span class='object_link'><a href="../Query.html" title="Brauser::Query (class)">Query</a></span></tt>) <strong>version_equals_to</strong>(versions = {})
|
527
529
|
|
528
530
|
|
529
531
|
|
532
|
+
<span class="aliases">Also known as:
|
533
|
+
<span class="names"><span id='v-instance_method'>v</span></span>
|
534
|
+
</span>
|
535
|
+
|
530
536
|
|
531
537
|
|
532
538
|
</h3><div class="docstring">
|
@@ -584,18 +590,18 @@ in form <code>{:operator => version}</code>, where operator is one of <code>:
|
|
584
590
|
<pre class="lines">
|
585
591
|
|
586
592
|
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
+
41
|
594
|
+
42
|
595
|
+
43
|
596
|
+
44
|
597
|
+
45
|
598
|
+
46</pre>
|
593
599
|
</td>
|
594
600
|
<td>
|
595
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
601
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/partial_querying.rb', line 41</span>
|
596
602
|
|
597
|
-
<span class='kw'>def</span> <span class='id identifier
|
598
|
-
<span class='id identifier rubyid_parse_agent'>parse_agent</span><span class='lparen'>(</span><span class='ivar'>@agent</span><span class='rparen'>)</span> <span class='kw'>
|
603
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_version_equals_to'>version_equals_to</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>
|
604
|
+
<span class='id identifier rubyid_parse_agent'>parse_agent</span><span class='lparen'>(</span><span class='ivar'>@agent</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@version</span>
|
599
605
|
<span class='id identifier rubyid_versions'>versions</span> <span class='op'>=</span> <span class='id identifier rubyid_versions'>versions</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_parse_versions_query'>parse_versions_query</span><span class='lparen'>(</span><span class='id identifier rubyid_versions'>versions</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_versions'>versions</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span>
|
600
606
|
|
601
607
|
<span class='op'>::</span><span class='const'>Brauser</span><span class='op'>::</span><span class='const'>Query</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_versions'>versions</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_operator'>operator</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='const'>Brauser</span><span class='op'>::</span><span class='const'>Browser</span><span class='period'>.</span><span class='id identifier rubyid_compare_versions'>compare_versions</span><span class='lparen'>(</span><span class='ivar'>@version</span><span class='comma'>,</span> <span class='id identifier rubyid_operator'>operator</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
|
@@ -610,9 +616,9 @@ in form <code>{:operator => version}</code>, where operator is one of <code>:
|
|
610
616
|
</div>
|
611
617
|
|
612
618
|
<div id="footer">
|
613
|
-
Generated on
|
619
|
+
Generated on Sat May 10 13:59:11 2014 by
|
614
620
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
615
|
-
0.8.7.
|
621
|
+
0.8.7.4 (ruby-2.1.0).
|
616
622
|
</div>
|
617
623
|
|
618
624
|
</body>
|