brauser 3.2.6 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af0f023ca26c76ee88fe2ed3d893e3f823a799a9
|
4
|
+
data.tar.gz: cb77b21fdf14b76d5dc44a4c7db67f75b5bf8bfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49417bc4419fa7740225c43cb89238470a6a143b13dd921257ca2596d52202ae90aa065fa8f6d630b6129f1aabd8f8a9f04e17c50a114273da1273c614a1b98f
|
7
|
+
data.tar.gz: a5c6155b3e0bcda792fb81b23bbda704b4da45ca88310caf471661da311be4c86a2b326c9e434dd45dfad600fc5cbf8bc54f8f5ecc9787e7d419e0dac9228f20
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
AsciiComments:
|
2
|
+
Enabled: false
|
3
|
+
|
4
|
+
Blocks:
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
BracesAroundHashParameters:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
CyclomaticComplexity:
|
11
|
+
Max: 15
|
12
|
+
|
13
|
+
IndentationConsistency:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
LineLength:
|
17
|
+
Max: 160
|
18
|
+
|
19
|
+
ParameterLists:
|
20
|
+
Max: 6
|
21
|
+
|
22
|
+
SignalException:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
SpaceInsideHashLiteralBraces:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
StringLiterals:
|
29
|
+
Enabled: false
|
data/.travis-gemfile
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -10,12 +10,12 @@ gemspec
|
|
10
10
|
|
11
11
|
# Testing
|
12
12
|
gem "rspec", "~> 2.14.1"
|
13
|
-
gem "rake", "~> 10.
|
13
|
+
gem "rake", "~> 10.3.1"
|
14
14
|
|
15
15
|
# Documentation
|
16
16
|
gem "simplecov", ">= 0.8.2"
|
17
17
|
gem "coveralls", ">= 0.7.0", require: false
|
18
18
|
gem "pry", ">= 0"
|
19
19
|
gem "yard", ">= 0.8.7"
|
20
|
-
gem "kramdown", ">= 1.3.
|
21
|
-
gem "github-markup", ">= 1.
|
20
|
+
gem "kramdown", ">= 1.3.3"
|
21
|
+
gem "github-markup", ">= 1.2.1"
|
data/README.md
CHANGED
@@ -83,7 +83,7 @@ browser.is?(:chrome, ">= 3", :windows)
|
|
83
83
|
|
84
84
|
The method `is` is the only which supports direct internal propagation to version and platform.
|
85
85
|
|
86
|
-
The `v` method queries about the browser version. You can specify the comparison with an hash or a little expression.
|
86
|
+
The `version` (short: `v`) method queries about the browser version. You can specify the comparison with an hash or a little expression.
|
87
87
|
|
88
88
|
In the case of hash, the syntax is `{:operator => value}`, where `:operator` is one of `[:lt, :lte, :eq, :gte, :gt]` and value can be a Float or a String.
|
89
89
|
|
@@ -93,7 +93,7 @@ Examples:
|
|
93
93
|
|
94
94
|
```ruby
|
95
95
|
# Those two methods are equivalent.
|
96
|
-
browser.
|
96
|
+
browser.version?({lt: "2", gt: 1})
|
97
97
|
# => true
|
98
98
|
browser.is?("< 2 && > 1")
|
99
99
|
# => true
|
@@ -129,8 +129,8 @@ Ideally, you should use the `?` version to end the query and fetch the result.
|
|
129
129
|
# These expressions are equivalent.
|
130
130
|
browser.is?(:chrome, {lt: "2"}, :osx)
|
131
131
|
browser.is(:chrome, {lt: "2"}, :osx).result
|
132
|
-
browser.is(:chrome).
|
133
|
-
browser.is(:chrome).
|
132
|
+
browser.is(:chrome).version({lt: "2"}).on?(:osx)
|
133
|
+
browser.is(:chrome).version({lt: "2"}).on(:osx).result
|
134
134
|
```
|
135
135
|
|
136
136
|
Finally, Brauser support dynamic query operator to write simple queries without using concatenation.
|
@@ -143,11 +143,11 @@ Example:
|
|
143
143
|
|
144
144
|
```ruby
|
145
145
|
# These expressions are equivalent.
|
146
|
-
browser.is(:chrome).
|
146
|
+
browser.is(:chrome).version("< 2 && > 1.2").on(:osx).result
|
147
147
|
browser.is_chrome_v_lt_2_and_gt_1_2_on_osx.result
|
148
148
|
|
149
149
|
# These expressions are equivalent.
|
150
|
-
browser.is(:chrome).
|
150
|
+
browser.is(:chrome).version("< 2 && > 1.2").on?(:osx)
|
151
151
|
browser.is_chrome_v_lt_2_and_gt_1_2_on_osx?
|
152
152
|
```
|
153
153
|
|
data/brauser.gemspec
CHANGED
data/doc/Brauser.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Brauser
|
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.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -79,8 +79,8 @@
|
|
79
79
|
|
80
80
|
|
81
81
|
<dt class="r1 last">Defined in:</dt>
|
82
|
-
<dd class="r1 last">lib/brauser/
|
83
|
-
lib/brauser/
|
82
|
+
<dd class="r1 last">lib/brauser/query.rb<span class="defines">,<br />
|
83
|
+
lib/brauser/hooks.rb,<br /> lib/brauser/version.rb,<br /> lib/brauser/browser.rb,<br /> lib/brauser/definition.rb,<br /> lib/brauser/queryable/queries.rb,<br /> lib/brauser/browseable/parsing.rb,<br /> lib/brauser/queryable/chainers.rb,<br /> lib/brauser/browseable/general.rb,<br /> lib/brauser/browseable/querying.rb,<br /> lib/brauser/browseable/register.rb,<br /> lib/brauser/definitions/browsers.rb,<br /> lib/brauser/definitions/platforms.rb,<br /> lib/brauser/definitions/languages.rb,<br /> lib/brauser/browseable/attributes.rb,<br /> lib/brauser/browseable/partial_querying.rb</span>
|
84
84
|
</dd>
|
85
85
|
|
86
86
|
</dl>
|
@@ -101,7 +101,7 @@ Licensed under the MIT license, which can be found at http://www.opensource.org/
|
|
101
101
|
<p class="children">
|
102
102
|
|
103
103
|
|
104
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Brauser/
|
104
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Brauser/Browseable.html" title="Brauser::Browseable (module)">Browseable</a></span>, <span class='object_link'><a href="Brauser/Hooks.html" title="Brauser::Hooks (module)">Hooks</a></span>, <span class='object_link'><a href="Brauser/Queryable.html" title="Brauser::Queryable (module)">Queryable</a></span>, <span class='object_link'><a href="Brauser/Version.html" title="Brauser::Version (module)">Version</a></span>
|
105
105
|
|
106
106
|
|
107
107
|
|
@@ -121,9 +121,9 @@ Licensed under the MIT license, which can be found at http://www.opensource.org/
|
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div id="footer">
|
124
|
-
Generated on
|
124
|
+
Generated on Sat May 10 13:59:11 2014 by
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
126
|
-
0.8.7.
|
126
|
+
0.8.7.4 (ruby-2.1.0).
|
127
127
|
</div>
|
128
128
|
|
129
129
|
</body>
|
@@ -0,0 +1,127 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Module: Brauser::Browseable
|
8
|
+
|
9
|
+
— 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/Browseable.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 (B)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Brauser.html" title="Brauser (module)">Brauser</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Browseable</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Module: Brauser::Browseable
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<dt class="r1 last">Defined in:</dt>
|
82
|
+
<dd class="r1 last">lib/brauser/browseable/parsing.rb<span class="defines">,<br />
|
83
|
+
lib/brauser/browseable/general.rb,<br /> lib/brauser/browseable/querying.rb,<br /> lib/brauser/browseable/register.rb,<br /> lib/brauser/definitions/browsers.rb,<br /> lib/brauser/definitions/platforms.rb,<br /> lib/brauser/definitions/languages.rb,<br /> lib/brauser/browseable/attributes.rb,<br /> lib/brauser/browseable/partial_querying.rb</span>
|
84
|
+
</dd>
|
85
|
+
|
86
|
+
</dl>
|
87
|
+
<div class="clear"></div>
|
88
|
+
|
89
|
+
<h2>Overview</h2><div class="docstring">
|
90
|
+
<div class="discussion">
|
91
|
+
<p>The interface of brauser browsers.</p>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="tags">
|
97
|
+
|
98
|
+
|
99
|
+
</div><h2>Defined Under Namespace</h2>
|
100
|
+
<p class="children">
|
101
|
+
|
102
|
+
|
103
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Browseable/Attributes.html" title="Brauser::Browseable::Attributes (module)">Attributes</a></span>, <span class='object_link'><a href="Browseable/DefaultDefinitions.html" title="Brauser::Browseable::DefaultDefinitions (module)">DefaultDefinitions</a></span>, <span class='object_link'><a href="Browseable/General.html" title="Brauser::Browseable::General (module)">General</a></span>, <span class='object_link'><a href="Browseable/Parsing.html" title="Brauser::Browseable::Parsing (module)">Parsing</a></span>, <span class='object_link'><a href="Browseable/PartialQuerying.html" title="Brauser::Browseable::PartialQuerying (module)">PartialQuerying</a></span>, <span class='object_link'><a href="Browseable/Querying.html" title="Brauser::Browseable::Querying (module)">Querying</a></span>, <span class='object_link'><a href="Browseable/Register.html" title="Brauser::Browseable::Register (module)">Register</a></span>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
</p>
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
<div id="footer">
|
121
|
+
Generated on Sat May 10 13:59:11 2014 by
|
122
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
123
|
+
0.8.7.4 (ruby-2.1.0).
|
124
|
+
</div>
|
125
|
+
|
126
|
+
</body>
|
127
|
+
</html>
|
@@ -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::Attributes
|
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/Attributes.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 (A)</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">Attributes</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::Attributes
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -83,14 +83,14 @@
|
|
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/attributes.rb</dd>
|
87
87
|
|
88
88
|
</dl>
|
89
89
|
<div class="clear"></div>
|
90
90
|
|
91
91
|
<h2>Overview</h2><div class="docstring">
|
92
92
|
<div class="discussion">
|
93
|
-
<p>Methods to handle attributes
|
93
|
+
<p>Methods to handle attributes.</p>
|
94
94
|
|
95
95
|
|
96
96
|
</div>
|
@@ -120,7 +120,7 @@
|
|
120
120
|
|
121
121
|
|
122
122
|
|
123
|
-
(also: #meta)
|
123
|
+
(also: #meta, #to_s)
|
124
124
|
|
125
125
|
</span>
|
126
126
|
|
@@ -201,7 +201,7 @@
|
|
201
201
|
|
202
202
|
|
203
203
|
<span class="aliases">Also known as:
|
204
|
-
<span class="names"><span id='meta-instance_method'>meta</span></span>
|
204
|
+
<span class="names"><span id='meta-instance_method'>meta</span>, <span id='to_s-instance_method'>to_s</span></span>
|
205
205
|
</span>
|
206
206
|
|
207
207
|
|
@@ -334,14 +334,14 @@
|
|
334
334
|
<pre class="lines">
|
335
335
|
|
336
336
|
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
337
|
+
46
|
338
|
+
47
|
339
|
+
48
|
340
|
+
49
|
341
|
+
50</pre>
|
342
342
|
</td>
|
343
343
|
<td>
|
344
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
344
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/attributes.rb', line 46</span>
|
345
345
|
|
346
346
|
<span class='kw'>def</span> <span class='id identifier rubyid_classes'>classes</span><span class='lparen'>(</span><span class='id identifier rubyid_join'>join</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</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_version'>version</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>version-</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_platform'>platform</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>platform-</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
347
347
|
<span class='id identifier rubyid_platform'>platform</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>platform-</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_platform'>platform</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span>
|
@@ -395,16 +395,16 @@
|
|
395
395
|
<pre class="lines">
|
396
396
|
|
397
397
|
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
398
|
+
25
|
399
|
+
26
|
400
|
+
27
|
401
|
+
28</pre>
|
402
402
|
</td>
|
403
403
|
<td>
|
404
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
404
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/attributes.rb', line 25</span>
|
405
405
|
|
406
406
|
<span class='kw'>def</span> <span class='id identifier rubyid_platform_name'>platform_name</span>
|
407
|
-
<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'>
|
407
|
+
<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>
|
408
408
|
<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_platforms'>platforms</span><span class='lbracket'>[</span><span class='ivar'>@platform</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_try'>try</span><span class='lparen'>(</span><span class='symbol'>:label</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unknown Platform</span><span class='tstring_end'>"</span></span>
|
409
409
|
<span class='kw'>end</span></pre>
|
410
410
|
</td>
|
@@ -454,17 +454,21 @@
|
|
454
454
|
<pre class="lines">
|
455
455
|
|
456
456
|
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
457
|
+
15
|
458
|
+
16
|
459
|
+
17
|
460
|
+
18
|
461
|
+
19
|
462
|
+
20</pre>
|
461
463
|
</td>
|
462
464
|
<td>
|
463
|
-
<pre class="code"><span class="info file"># File 'lib/brauser/
|
465
|
+
<pre class="code"><span class="info file"># File 'lib/brauser/browseable/attributes.rb', line 15</span>
|
464
466
|
|
465
467
|
<span class='kw'>def</span> <span class='id identifier rubyid_readable_name'>readable_name</span>
|
466
|
-
<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'>
|
467
|
-
<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_browsers'>browsers</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='ivar'>@name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span>
|
468
|
+
<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>
|
469
|
+
<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_browsers'>browsers</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='ivar'>@name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span>
|
470
|
+
<span class='kw'>rescue</span> <span class='const'>KeyError</span>
|
471
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unknown Browser</span><span class='tstring_end'>"</span></span>
|
468
472
|
<span class='kw'>end</span></pre>
|
469
473
|
</td>
|
470
474
|
</tr>
|
@@ -476,9 +480,9 @@
|
|
476
480
|
</div>
|
477
481
|
|
478
482
|
<div id="footer">
|
479
|
-
Generated on
|
483
|
+
Generated on Sat May 10 13:59:11 2014 by
|
480
484
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
481
|
-
0.8.7.
|
485
|
+
0.8.7.4 (ruby-2.1.0).
|
482
486
|
</div>
|
483
487
|
|
484
488
|
</body>
|