wwwjdic 14.0.0 → 15.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +19 -0
- data/Gemfile +5 -1
- data/README.md +461 -192
- data/Rakefile +7 -2
- data/copyright.md +17 -29
- data/examples/basics.rb +51 -45
- data/examples/translate.rb +135 -86
- data/examples/uri.rb +34 -78
- data/html/CHANGELOG.html +48 -31
- data/html/COPYING_md.html +31 -35
- data/html/Gemfile.html +28 -32
- data/html/Object.html +71 -71
- data/html/README_md.html +326 -159
- data/html/Rakefile.html +29 -33
- data/html/WWWJDic.html +137 -98
- data/html/WWWJDic/ParsableDuckType.html +55 -55
- data/html/WWWJDic/Parser.html +88 -88
- data/html/WWWJDic/Parsers.html +33 -33
- data/html/WWWJDic/Parsers/Dict.html +71 -73
- data/html/WWWJDic/Parsers/Display.html +66 -66
- data/html/WWWJDic/Parsers/Key.html +67 -67
- data/html/WWWJDic/Parsers/Search.html +59 -58
- data/html/WWWJDic/Parsers/Server.html +66 -66
- data/html/WWWJDic/Splitter.html +173 -172
- data/html/WWWJDic/Utils.html +34 -34
- data/html/WWWJDic/Utils/Downloader.html +33 -33
- data/html/WWWJDic/Utils/Downloader/Downloader.html +91 -89
- data/html/WWWJDic/Utils/Raisers.html +95 -95
- data/html/WWWJDic/WWWJDic.html +343 -345
- data/html/copyright_md.html +37 -51
- data/html/created.rid +55 -57
- data/html/index.html +334 -164
- data/html/js/darkfish.js +84 -84
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +110 -110
- data/html/js/search_index.js +1 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js +229 -229
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +44 -75
- data/lib/wwwjdic.rb +7 -11
- data/lib/wwwjdic/application.rb +13 -7
- data/lib/wwwjdic/constants.rb +16 -8
- data/lib/wwwjdic/locales/de.yml +5 -4
- data/lib/wwwjdic/locales/en.yml +5 -4
- data/lib/wwwjdic/locales/es.yml +5 -4
- data/lib/wwwjdic/locales/fr.yml +6 -4
- data/lib/wwwjdic/locales/hu.yml +6 -4
- data/lib/wwwjdic/locales/it.yml +6 -4
- data/lib/wwwjdic/locales/ja.yml +8 -4
- data/lib/wwwjdic/locales/nl.yml +5 -4
- data/lib/wwwjdic/locales/ru.yml +5 -4
- data/lib/wwwjdic/locales/sl.yml +5 -4
- data/lib/wwwjdic/locales/sv.yml +5 -4
- data/lib/wwwjdic/parser.rb +8 -4
- data/lib/wwwjdic/parsers/dict.rb +9 -7
- data/lib/wwwjdic/parsers/display.rb +6 -2
- data/lib/wwwjdic/parsers/key.rb +8 -3
- data/lib/wwwjdic/parsers/search.rb +8 -3
- data/lib/wwwjdic/parsers/server.rb +6 -2
- data/lib/wwwjdic/utils/downloader.rb +21 -23
- data/lib/wwwjdic/utils/raisers.rb +7 -3
- data/lib/wwwjdic/utils/splitter.rb +20 -14
- data/lib/wwwjdic/version.rb +2 -6
- data/test/test_helper.rb +5 -1
- data/test/test_wwwjdic.rb +6 -2
- data/test/wwwjdic/locales/de.yml +7 -1
- data/test/wwwjdic/locales/en.yml +7 -1
- data/test/wwwjdic/locales/es.yml +7 -1
- data/test/wwwjdic/locales/fr.yml +7 -1
- data/test/wwwjdic/locales/hu.yml +7 -1
- data/test/wwwjdic/locales/it.yml +10 -3
- data/test/wwwjdic/locales/ja.yml +9 -2
- data/test/wwwjdic/locales/nl.yml +7 -1
- data/test/wwwjdic/locales/ru.yml +7 -1
- data/test/wwwjdic/locales/sl.yml +7 -1
- data/test/wwwjdic/locales/sv.yml +7 -1
- data/test/wwwjdic/locales/test_locales.rb +12 -9
- data/test/wwwjdic/parsers/test_dict.rb +6 -2
- data/test/wwwjdic/parsers/test_display.rb +6 -2
- data/test/wwwjdic/parsers/test_key.rb +6 -2
- data/test/wwwjdic/parsers/test_server.rb +6 -2
- data/test/wwwjdic/test_application.rb +12 -8
- data/test/wwwjdic/test_parsable_duck_type.rb +6 -2
- data/test/wwwjdic/utils/test_downloader.rb +5 -1
- data/test/wwwjdic/utils/test_raisers.rb +10 -6
- data/wwwjdic.gemspec +30 -14
- metadata +50 -22
- data/acknowledgements.md +0 -55
- data/authors.md +0 -67
- data/html/acknowledgements_md.html +0 -150
- data/html/authors_md.html +0 -182
@@ -4,18 +4,18 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>module WWWJDic::ParsableDuckType - wwwjdic
|
7
|
+
<title>module WWWJDic::ParsableDuckType - wwwjdic 15.0.0</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
11
|
var index_rel_prefix = "../";
|
12
12
|
</script>
|
13
13
|
|
14
|
-
<script src="../js/navigation.js"
|
15
|
-
<script src="../js/search.js"
|
16
|
-
<script src="../js/search_index.js"
|
17
|
-
<script src="../js/searcher.js"
|
18
|
-
<script src="../js/darkfish.js"
|
14
|
+
<script defer src="../js/navigation.js"></script>
|
15
|
+
<script defer src="../js/search.js"></script>
|
16
|
+
<script defer src="../js/search_index.js"></script>
|
17
|
+
<script defer src="../js/searcher.js"></script>
|
18
|
+
<script defer src="../js/darkfish.js"></script>
|
19
19
|
|
20
20
|
<link href="../css/fonts.css" rel="stylesheet">
|
21
21
|
<link href="../css/rdoc.css" rel="stylesheet">
|
@@ -23,10 +23,10 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
<body id="top" role="document"
|
26
|
+
<body class="module" id="top" role="document">
|
27
27
|
<nav role="navigation">
|
28
28
|
<div id="project-navigation">
|
29
|
-
<div id="home-section" role="region" title="Quick navigation"
|
29
|
+
<div class="nav-section" id="home-section" role="region" title="Quick navigation">
|
30
30
|
<h2>
|
31
31
|
<a href="../index.html" rel="home">Home</a>
|
32
32
|
</h2>
|
@@ -38,58 +38,58 @@
|
|
38
38
|
</div>
|
39
39
|
</div>
|
40
40
|
|
41
|
-
<div
|
42
|
-
<form action="#" method="get"
|
41
|
+
<div class="project-section initially-hidden" id="search-section" role="search">
|
42
|
+
<form accept-charset="utf-8" action="#" method="get">
|
43
43
|
<div id="search-field-wrapper">
|
44
|
-
<input
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
<input aria-autocomplete="list" aria-controls="search-results" aria-label="Search"
|
45
|
+
id="search-field" name="search"
|
46
|
+
placeholder="Search" role="combobox" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"
|
47
|
+
type="text">
|
48
48
|
</div>
|
49
49
|
|
50
|
-
<ul
|
51
|
-
aria-
|
52
|
-
|
50
|
+
<ul aria-atomic="false" aria-busy="false"
|
51
|
+
aria-expanded="false" aria-label="Search Results"
|
52
|
+
class="initially-hidden" id="search-results"></ul>
|
53
53
|
</form>
|
54
54
|
</div>
|
55
55
|
|
56
56
|
</div>
|
57
57
|
|
58
|
-
|
58
|
+
|
59
59
|
|
60
60
|
<div id="class-metadata">
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
65
|
<!-- Method Quickref -->
|
66
|
-
<div
|
66
|
+
<div class="nav-section" id="method-list-section">
|
67
67
|
<h3>Methods</h3>
|
68
68
|
|
69
69
|
<ul class="link-list" role="directory">
|
70
|
-
|
70
|
+
|
71
71
|
<li ><a href="#method-i-test_parsable_duck_type">#test_parsable_duck_type</a>
|
72
|
-
|
72
|
+
|
73
73
|
</ul>
|
74
74
|
</div>
|
75
75
|
|
76
76
|
</div>
|
77
77
|
</nav>
|
78
78
|
|
79
|
-
<main
|
80
|
-
<h1 id="module-WWWJDic::ParsableDuckType"
|
79
|
+
<main aria-labelledby="module-WWWJDic::ParsableDuckType" role="main">
|
80
|
+
<h1 class="module" id="module-WWWJDic::ParsableDuckType">
|
81
81
|
module WWWJDic::ParsableDuckType
|
82
82
|
</h1>
|
83
83
|
|
84
84
|
<section class="description">
|
85
|
-
|
85
|
+
|
86
86
|
<p>This module represents the parsable duck type element for testing purposes.</p>
|
87
87
|
<dl class="rdoc-list note-list"><dt>Author
|
88
88
|
<dd>
|
89
89
|
<p><a href="mailto:marcobresciani_1974@libero.it">Marco Bresciani</a></p>
|
90
90
|
</dd><dt>Copyright
|
91
91
|
<dd>
|
92
|
-
<p>Copyright
|
92
|
+
<p>Copyright (C) 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani</p>
|
93
93
|
</dd><dt>License
|
94
94
|
<dd>
|
95
95
|
<p>GNU General Public License version 3</p>
|
@@ -97,58 +97,58 @@
|
|
97
97
|
|
98
98
|
</section>
|
99
99
|
|
100
|
-
|
101
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
102
|
-
|
103
100
|
|
104
|
-
|
101
|
+
<section class="documentation-section" id="5Buntitled-5D">
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
105
108
|
|
106
|
-
|
107
109
|
|
108
|
-
|
109
110
|
|
110
|
-
|
111
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
111
|
+
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
112
112
|
<header>
|
113
113
|
<h3>Public Instance Methods</h3>
|
114
114
|
</header>
|
115
115
|
|
116
|
-
|
117
|
-
<div
|
118
|
-
|
116
|
+
|
117
|
+
<div class="method-detail " id="method-i-test_parsable_duck_type">
|
118
|
+
|
119
119
|
<div class="method-heading">
|
120
120
|
<span class="method-name">test_parsable_duck_type</span><span
|
121
121
|
class="method-args">()</span>
|
122
|
-
|
122
|
+
|
123
123
|
<span class="method-click-advice">click to toggle source</span>
|
124
|
-
|
124
|
+
|
125
125
|
</div>
|
126
|
-
|
126
|
+
|
127
127
|
|
128
128
|
<div class="method-description">
|
129
|
-
|
129
|
+
|
130
130
|
<p>The method that tests the parsable duck type interface and its <code>parse</code> method.</p>
|
131
|
-
|
132
|
-
|
133
131
|
|
134
|
-
|
132
|
+
|
133
|
+
|
134
|
+
|
135
135
|
<div class="method-source-code" id="test_parsable_duck_type-source">
|
136
136
|
<pre> <span class="ruby-comment"># File test/wwwjdic/test_parsable_duck_type.rb</span>
|
137
|
-
<span class="line-num">
|
138
|
-
<span class="line-num">
|
139
|
-
<span class="line-num">
|
137
|
+
<span class="line-num">37</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">test_parsable_duck_type</span>
|
138
|
+
<span class="line-num">38</span> <span class="ruby-identifier">_</span>(<span class="ruby-identifier">subject</span>).<span class="ruby-identifier">must_respond_to</span> <span class="ruby-value">:parse</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">subject</span>.<span class="ruby-identifier">nil?</span>
|
139
|
+
<span class="line-num">39</span> <span class="ruby-keyword">end</span></pre>
|
140
140
|
</div>
|
141
|
-
|
141
|
+
|
142
142
|
</div>
|
143
143
|
|
144
|
-
|
145
144
|
|
146
|
-
|
145
|
+
|
146
|
+
|
147
147
|
</div>
|
148
148
|
|
149
|
-
|
149
|
+
|
150
150
|
</section>
|
151
|
-
|
151
|
+
|
152
152
|
</section>
|
153
153
|
|
154
154
|
</main>
|
data/html/WWWJDic/Parser.html
CHANGED
@@ -4,18 +4,18 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class WWWJDic::Parser - wwwjdic
|
7
|
+
<title>class WWWJDic::Parser - wwwjdic 15.0.0</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
11
|
var index_rel_prefix = "../";
|
12
12
|
</script>
|
13
13
|
|
14
|
-
<script src="../js/navigation.js"
|
15
|
-
<script src="../js/search.js"
|
16
|
-
<script src="../js/search_index.js"
|
17
|
-
<script src="../js/searcher.js"
|
18
|
-
<script src="../js/darkfish.js"
|
14
|
+
<script defer src="../js/navigation.js"></script>
|
15
|
+
<script defer src="../js/search.js"></script>
|
16
|
+
<script defer src="../js/search_index.js"></script>
|
17
|
+
<script defer src="../js/searcher.js"></script>
|
18
|
+
<script defer src="../js/darkfish.js"></script>
|
19
19
|
|
20
20
|
<link href="../css/fonts.css" rel="stylesheet">
|
21
21
|
<link href="../css/rdoc.css" rel="stylesheet">
|
@@ -23,10 +23,10 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
<body id="top" role="document"
|
26
|
+
<body class="class" id="top" role="document">
|
27
27
|
<nav role="navigation">
|
28
28
|
<div id="project-navigation">
|
29
|
-
<div id="home-section" role="region" title="Quick navigation"
|
29
|
+
<div class="nav-section" id="home-section" role="region" title="Quick navigation">
|
30
30
|
<h2>
|
31
31
|
<a href="../index.html" rel="home">Home</a>
|
32
32
|
</h2>
|
@@ -38,67 +38,67 @@
|
|
38
38
|
</div>
|
39
39
|
</div>
|
40
40
|
|
41
|
-
<div
|
42
|
-
<form action="#" method="get"
|
41
|
+
<div class="project-section initially-hidden" id="search-section" role="search">
|
42
|
+
<form accept-charset="utf-8" action="#" method="get">
|
43
43
|
<div id="search-field-wrapper">
|
44
|
-
<input
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
<input aria-autocomplete="list" aria-controls="search-results" aria-label="Search"
|
45
|
+
id="search-field" name="search"
|
46
|
+
placeholder="Search" role="combobox" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"
|
47
|
+
type="text">
|
48
48
|
</div>
|
49
49
|
|
50
|
-
<ul
|
51
|
-
aria-
|
52
|
-
|
50
|
+
<ul aria-atomic="false" aria-busy="false"
|
51
|
+
aria-expanded="false" aria-label="Search Results"
|
52
|
+
class="initially-hidden" id="search-results"></ul>
|
53
53
|
</form>
|
54
54
|
</div>
|
55
55
|
|
56
56
|
</div>
|
57
57
|
|
58
|
-
|
58
|
+
|
59
59
|
|
60
60
|
<div id="class-metadata">
|
61
|
-
|
62
|
-
<div
|
61
|
+
|
62
|
+
<div class="nav-section" id="parent-class-section">
|
63
63
|
<h3>Parent</h3>
|
64
64
|
|
65
|
-
|
65
|
+
|
66
66
|
<p class="link"><a href="../Object.html">Object</a>
|
67
|
-
|
67
|
+
|
68
68
|
</div>
|
69
69
|
|
70
|
-
|
71
|
-
|
70
|
+
|
71
|
+
|
72
72
|
<!-- Method Quickref -->
|
73
|
-
<div
|
73
|
+
<div class="nav-section" id="method-list-section">
|
74
74
|
<h3>Methods</h3>
|
75
75
|
|
76
76
|
<ul class="link-list" role="directory">
|
77
|
-
|
77
|
+
|
78
78
|
<li ><a href="#method-c-new">::new</a>
|
79
|
-
|
79
|
+
|
80
80
|
<li ><a href="#method-i-parse">#parse</a>
|
81
|
-
|
81
|
+
|
82
82
|
</ul>
|
83
83
|
</div>
|
84
84
|
|
85
85
|
</div>
|
86
86
|
</nav>
|
87
87
|
|
88
|
-
<main
|
89
|
-
<h1 id="class-WWWJDic::Parser"
|
88
|
+
<main aria-labelledby="class-WWWJDic::Parser" role="main">
|
89
|
+
<h1 class="class" id="class-WWWJDic::Parser">
|
90
90
|
class WWWJDic::Parser
|
91
91
|
</h1>
|
92
92
|
|
93
93
|
<section class="description">
|
94
|
-
|
94
|
+
|
95
95
|
<p>This class is a simple utility that is used to <a href="Parser.html#method-i-parse"><code>parse</code></a> and filter parameters for wwwjdic.</p>
|
96
96
|
<dl class="rdoc-list note-list"><dt>Author
|
97
97
|
<dd>
|
98
98
|
<p><a href="mailto:marcobresciani_1974@libero.it">Marco Bresciani</a></p>
|
99
99
|
</dd><dt>Copyright
|
100
100
|
<dd>
|
101
|
-
<p>
|
101
|
+
<p>(C) 2014 Marco Bresciani</p>
|
102
102
|
</dd><dt>License
|
103
103
|
<dd>
|
104
104
|
<p>GNU General Public License version 3</p>
|
@@ -106,123 +106,123 @@
|
|
106
106
|
|
107
107
|
</section>
|
108
108
|
|
109
|
-
|
110
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
111
|
-
|
112
109
|
|
113
|
-
|
110
|
+
<section class="documentation-section" id="5Buntitled-5D">
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
114
116
|
|
115
|
-
|
116
117
|
|
117
|
-
|
118
118
|
<section class="attribute-method-details" class="method-section">
|
119
119
|
<header>
|
120
120
|
<h3>Attributes</h3>
|
121
121
|
</header>
|
122
122
|
|
123
|
-
|
124
|
-
<div id="attribute-i-parsers"
|
123
|
+
|
124
|
+
<div class="method-detail" id="attribute-i-parsers">
|
125
125
|
<div class="method-heading attribute-method-heading">
|
126
126
|
<span class="method-name">parsers</span><span
|
127
127
|
class="attribute-access-type">[R]</span>
|
128
128
|
</div>
|
129
129
|
|
130
130
|
<div class="method-description">
|
131
|
-
|
132
|
-
|
133
|
-
|
131
|
+
|
132
|
+
|
133
|
+
|
134
134
|
</div>
|
135
135
|
</div>
|
136
|
-
|
136
|
+
|
137
137
|
</section>
|
138
|
-
|
139
138
|
|
140
|
-
|
141
|
-
|
139
|
+
|
140
|
+
|
141
|
+
<section class="method-section" id="public-class-5Buntitled-5D-method-details">
|
142
142
|
<header>
|
143
143
|
<h3>Public Class Methods</h3>
|
144
144
|
</header>
|
145
145
|
|
146
|
-
|
147
|
-
<div
|
148
|
-
|
146
|
+
|
147
|
+
<div class="method-detail " id="method-c-new">
|
148
|
+
|
149
149
|
<div class="method-heading">
|
150
150
|
<span class="method-name">new</span><span
|
151
151
|
class="method-args">(args = {})</span>
|
152
|
-
|
152
|
+
|
153
153
|
<span class="method-click-advice">click to toggle source</span>
|
154
|
-
|
154
|
+
|
155
155
|
</div>
|
156
|
-
|
156
|
+
|
157
157
|
|
158
158
|
<div class="method-description">
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
159
|
|
164
|
-
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
165
|
<div class="method-source-code" id="new-source">
|
166
166
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/parser.rb</span>
|
167
|
-
<span class="line-num">
|
168
|
-
<span class="line-num">
|
169
|
-
<span class="line-num">
|
170
|
-
<span class="line-num">
|
167
|
+
<span class="line-num">38</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">args</span> = {})
|
168
|
+
<span class="line-num">39</span> <span class="ruby-ivar">@parsers</span> = {}
|
169
|
+
<span class="line-num">40</span> <span class="ruby-constant">ALL_PARAMS</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">param</span><span class="ruby-operator">|</span> <span class="ruby-identifier">parsers</span>[<span class="ruby-identifier">param</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">param</span>] } <span class="ruby-keyword">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">nil?</span>
|
170
|
+
<span class="line-num">41</span> <span class="ruby-keyword">end</span></pre>
|
171
171
|
</div>
|
172
|
-
|
172
|
+
|
173
173
|
</div>
|
174
174
|
|
175
|
-
|
176
175
|
|
177
|
-
|
176
|
+
|
177
|
+
|
178
178
|
</div>
|
179
179
|
|
180
|
-
|
180
|
+
|
181
181
|
</section>
|
182
|
-
|
183
|
-
<section id="public-instance-5Buntitled-5D-method-details"
|
182
|
+
|
183
|
+
<section class="method-section" id="public-instance-5Buntitled-5D-method-details">
|
184
184
|
<header>
|
185
185
|
<h3>Public Instance Methods</h3>
|
186
186
|
</header>
|
187
187
|
|
188
|
-
|
189
|
-
<div
|
190
|
-
|
188
|
+
|
189
|
+
<div class="method-detail " id="method-i-parse">
|
190
|
+
|
191
191
|
<div class="method-heading">
|
192
192
|
<span class="method-name">parse</span><span
|
193
193
|
class="method-args">(method = nil, value = nil)</span>
|
194
|
-
|
194
|
+
|
195
195
|
<span class="method-click-advice">click to toggle source</span>
|
196
|
-
|
196
|
+
|
197
197
|
</div>
|
198
|
-
|
198
|
+
|
199
199
|
|
200
200
|
<div class="method-description">
|
201
|
-
|
201
|
+
|
202
202
|
<p>Provides the duck type for a generic parsing object.</p>
|
203
|
-
|
204
|
-
|
205
203
|
|
206
|
-
|
204
|
+
|
205
|
+
|
206
|
+
|
207
207
|
<div class="method-source-code" id="parse-source">
|
208
208
|
<pre> <span class="ruby-comment"># File lib/wwwjdic/parser.rb</span>
|
209
|
-
<span class="line-num">
|
210
|
-
<span class="line-num">
|
211
|
-
<span class="line-num">
|
212
|
-
<span class="line-num">
|
213
|
-
<span class="line-num">
|
209
|
+
<span class="line-num">44</span> <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse</span>(<span class="ruby-identifier">method</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">value</span> = <span class="ruby-keyword">nil</span>)
|
210
|
+
<span class="line-num">45</span> <span class="ruby-identifier">a_parser</span> = <span class="ruby-keyword">nil</span>
|
211
|
+
<span class="line-num">46</span> <span class="ruby-identifier">a_parser</span> = <span class="ruby-identifier">parsers</span>[<span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_sym</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">method</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">parsers</span>.<span class="ruby-identifier">nil?</span>
|
212
|
+
<span class="line-num">47</span> <span class="ruby-identifier">a_parser</span>&.<span class="ruby-identifier">parse</span> <span class="ruby-identifier">value</span>
|
213
|
+
<span class="line-num">48</span> <span class="ruby-keyword">end</span></pre>
|
214
214
|
</div>
|
215
|
-
|
215
|
+
|
216
216
|
</div>
|
217
217
|
|
218
|
-
|
219
218
|
|
220
|
-
|
219
|
+
|
220
|
+
|
221
221
|
</div>
|
222
222
|
|
223
|
-
|
223
|
+
|
224
224
|
</section>
|
225
|
-
|
225
|
+
|
226
226
|
</section>
|
227
227
|
|
228
228
|
</main>
|