student_mvp 0.1.8 → 0.1.10
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/doc/App_logger.html +47 -33
- data/doc/DB_client.html +20 -10
- data/doc/created.rid +10 -44
- data/doc/index.html +2 -81
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/table_of_contents.html +9 -697
- data/lib/data_access/DB_client/DB_client.rb +20 -1
- data/lib/logger/logger.rb +35 -0
- data/lib/presenters/base_presenters/student_list_presenter.rb +1 -1
- data/lib/student_mvp/version.rb +1 -1
- metadata +56 -35
- data/doc/Binary_tree.html +0 -300
- data/doc/Binary_tree_iterator.html +0 -217
- data/doc/Contact_sort_decorator.html +0 -219
- data/doc/Data_list.html +0 -625
- data/doc/Data_list_student_short.html +0 -148
- data/doc/Data_storage_strategy.html +0 -178
- data/doc/Data_table.html +0 -264
- data/doc/Deep_dup.html +0 -152
- data/doc/Field_filter_decorator.html +0 -219
- data/doc/Filter.html +0 -148
- data/doc/Filter_decorator.html +0 -209
- data/doc/Full_name_filter_decorator.html +0 -211
- data/doc/Full_name_sort_decorator.html +0 -217
- data/doc/Gemfile.html +0 -98
- data/doc/Git_sort_decorator.html +0 -220
- data/doc/Has_not_field_filter_decorator.html +0 -209
- data/doc/JSON_storage_strategy.html +0 -183
- data/doc/Person.html +0 -511
- data/doc/README_md.html +0 -147
- data/doc/Rakefile.html +0 -94
- data/doc/Sort_decorator.html +0 -214
- data/doc/Student.html +0 -755
- data/doc/StudentMvp/Error.html +0 -105
- data/doc/StudentMvp.html +0 -111
- data/doc/Student_short.html +0 -398
- data/doc/Students_list.html +0 -341
- data/doc/Students_list_DB.html +0 -361
- data/doc/Students_list_file.html +0 -460
- data/doc/Students_list_file_adapter.html +0 -341
- data/doc/Students_list_interface.html +0 -298
- data/doc/YAML_storage_strategy.html +0 -183
- data/doc/bin/setup.html +0 -96
data/doc/Gemfile.html
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
-
|
8
|
-
<title>Gemfile - RDoc Documentation</title>
|
9
|
-
|
10
|
-
<meta name="keywords" content="ruby,documentation,Gemfile">
|
11
|
-
<meta name="description" content="Gemfile: Specify your gem's dependencies in student_mvp.">
|
12
|
-
|
13
|
-
<script type="text/javascript">
|
14
|
-
var rdoc_rel_prefix = "./";
|
15
|
-
var index_rel_prefix = "./";
|
16
|
-
</script>
|
17
|
-
|
18
|
-
<script src="./js/navigation.js" defer></script>
|
19
|
-
<script src="./js/search.js" defer></script>
|
20
|
-
<script src="./js/search_index.js" defer></script>
|
21
|
-
<script src="./js/searcher.js" defer></script>
|
22
|
-
<script src="./js/darkfish.js" defer></script>
|
23
|
-
|
24
|
-
<link href="./css/fonts.css" rel="stylesheet">
|
25
|
-
<link href="./css/rdoc.css" rel="stylesheet">
|
26
|
-
|
27
|
-
|
28
|
-
<body id="top" role="document" class="file">
|
29
|
-
<div id="navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="true" aria-controls="navigation">
|
30
|
-
<span aria-hidden="true">☰</span>
|
31
|
-
</div>
|
32
|
-
|
33
|
-
|
34
|
-
<nav id="navigation" role="navigation">
|
35
|
-
<div id="project-navigation">
|
36
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
37
|
-
<h2>
|
38
|
-
<a href="./index.html" rel="home">Home</a>
|
39
|
-
</h2>
|
40
|
-
|
41
|
-
<div id="table-of-contents-navigation">
|
42
|
-
<a href="./table_of_contents.html#pages">Pages</a>
|
43
|
-
<a href="./table_of_contents.html#classes">Classes</a>
|
44
|
-
<a href="./table_of_contents.html#methods">Methods</a>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
|
48
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
49
|
-
<form action="#" method="get" accept-charset="utf-8">
|
50
|
-
<div id="search-field-wrapper">
|
51
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
52
|
-
aria-autocomplete="list" aria-controls="search-results"
|
53
|
-
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
54
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<ul id="search-results" aria-label="Search Results"
|
58
|
-
aria-busy="false" aria-expanded="false"
|
59
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
60
|
-
</form>
|
61
|
-
</div>
|
62
|
-
|
63
|
-
</div>
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
<div id="fileindex-section" class="nav-section">
|
68
|
-
<h3>Pages</h3>
|
69
|
-
|
70
|
-
<ul class="link-list">
|
71
|
-
<li><a href="./Gemfile.html">Gemfile</a>
|
72
|
-
<li><a href="./README_md.html">README</a>
|
73
|
-
<li><a href="./Rakefile.html">Rakefile</a>
|
74
|
-
<li><a href="./bin/setup.html">setup</a>
|
75
|
-
</ul>
|
76
|
-
</div>
|
77
|
-
|
78
|
-
|
79
|
-
<footer id="validator-badges" role="contentinfo">
|
80
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
81
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.8.1.
|
82
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
83
|
-
</footer>
|
84
|
-
|
85
|
-
</nav>
|
86
|
-
|
87
|
-
<main role="main" aria-label="Page Gemfile">
|
88
|
-
|
89
|
-
<p># frozen_string_literal: true</p>
|
90
|
-
|
91
|
-
<p>source “<a href="https://rubygems.org">rubygems.org</a>”</p>
|
92
|
-
|
93
|
-
<p># Specify your gem’s dependencies in student_mvp.gemspec gemspec</p>
|
94
|
-
|
95
|
-
<p>gem “rake”, “~> 13.0”</p>
|
96
|
-
|
97
|
-
</main>
|
98
|
-
|
data/doc/Git_sort_decorator.html
DELETED
@@ -1,220 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
-
|
8
|
-
<title>class Git_sort_decorator - RDoc Documentation</title>
|
9
|
-
|
10
|
-
<meta name="keywords" content="ruby,class,Git_sort_decorator">
|
11
|
-
|
12
|
-
<meta name="description" content="Documentation for the Git_sort_decorator class">
|
13
|
-
|
14
|
-
<script type="text/javascript">
|
15
|
-
var rdoc_rel_prefix = "./";
|
16
|
-
var index_rel_prefix = "./";
|
17
|
-
</script>
|
18
|
-
|
19
|
-
<script src="./js/navigation.js" defer></script>
|
20
|
-
<script src="./js/search.js" defer></script>
|
21
|
-
<script src="./js/search_index.js" defer></script>
|
22
|
-
<script src="./js/searcher.js" defer></script>
|
23
|
-
<script src="./js/darkfish.js" defer></script>
|
24
|
-
|
25
|
-
<link href="./css/fonts.css" rel="stylesheet">
|
26
|
-
<link href="./css/rdoc.css" rel="stylesheet">
|
27
|
-
|
28
|
-
|
29
|
-
<body id="top" role="document" class="class">
|
30
|
-
<div id="navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="true" aria-controls="navigation">
|
31
|
-
<span aria-hidden="true">☰</span>
|
32
|
-
</div>
|
33
|
-
|
34
|
-
|
35
|
-
<nav id="navigation" role="navigation">
|
36
|
-
<div id="project-navigation">
|
37
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
38
|
-
<h2>
|
39
|
-
<a href="./index.html" rel="home">Home</a>
|
40
|
-
</h2>
|
41
|
-
|
42
|
-
<div id="table-of-contents-navigation">
|
43
|
-
<a href="./table_of_contents.html#pages">Pages</a>
|
44
|
-
<a href="./table_of_contents.html#classes">Classes</a>
|
45
|
-
<a href="./table_of_contents.html#methods">Methods</a>
|
46
|
-
</div>
|
47
|
-
</div>
|
48
|
-
|
49
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
50
|
-
<form action="#" method="get" accept-charset="utf-8">
|
51
|
-
<div id="search-field-wrapper">
|
52
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
53
|
-
aria-autocomplete="list" aria-controls="search-results"
|
54
|
-
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
55
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
56
|
-
</div>
|
57
|
-
|
58
|
-
<ul id="search-results" aria-label="Search Results"
|
59
|
-
aria-busy="false" aria-expanded="false"
|
60
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
61
|
-
</form>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
</div>
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
<div id="parent-class-section" class="nav-section">
|
69
|
-
<h3>Ancestors</h3>
|
70
|
-
<ul><li><a href="Filter_decorator.html">Filter_decorator</a><ul><li><a href="Filter.html">Filter</a><ul><li>Object</li></ul></li></ul></li></ul>
|
71
|
-
</div>
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<div class="nav-section">
|
77
|
-
<h3>Class Methods</h3>
|
78
|
-
<ul class="link-list" role="directory">
|
79
|
-
<li class="calls-super" ><a href="#method-c-new">new</a></li>
|
80
|
-
</ul>
|
81
|
-
</div>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<div class="nav-section">
|
86
|
-
<h3>Instance Methods</h3>
|
87
|
-
<ul class="link-list" role="directory">
|
88
|
-
<li class="calls-super" ><a href="#method-i-apply">apply</a></li>
|
89
|
-
</ul>
|
90
|
-
</div>
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
<footer id="validator-badges" role="contentinfo">
|
95
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
96
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.8.1.
|
97
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
98
|
-
</footer>
|
99
|
-
|
100
|
-
</nav>
|
101
|
-
|
102
|
-
<main role="main" aria-labelledby="class-Git_sort_decorator">
|
103
|
-
<h1 id="class-Git_sort_decorator" class="anchor-link class">
|
104
|
-
class Git_sort_decorator
|
105
|
-
</h1>
|
106
|
-
|
107
|
-
<section class="description">
|
108
|
-
|
109
|
-
</section>
|
110
|
-
|
111
|
-
<section id="5Buntitled-5D" class="documentation-section anchor-link">
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section anchor-link">
|
118
|
-
<header>
|
119
|
-
<h3>Public Class Methods</h3>
|
120
|
-
</header>
|
121
|
-
|
122
|
-
<div id="method-c-new" class="method-detail anchor-link ">
|
123
|
-
<div class="method-header">
|
124
|
-
<div class="method-heading">
|
125
|
-
<a href="#method-c-new" title="Link to this method">
|
126
|
-
<span class="method-name">new</span>
|
127
|
-
<span class="method-args">(filter, order)</span>
|
128
|
-
</a>
|
129
|
-
</div>
|
130
|
-
</div>
|
131
|
-
|
132
|
-
<div class="method-controls">
|
133
|
-
<details class="method-source-toggle">
|
134
|
-
<summary>Source</summary>
|
135
|
-
</details>
|
136
|
-
</div>
|
137
|
-
|
138
|
-
<div class="method-description">
|
139
|
-
<div class="method-source-code" id="new-source">
|
140
|
-
<pre><span class="ruby-comment"># File lib/models/filter/student_filters/git_sort_decorator.rb, line 4</span>
|
141
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">filter</span>, <span class="ruby-identifier">order</span>)
|
142
|
-
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">filter</span>)
|
143
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">order</span> = <span class="ruby-identifier">order</span>
|
144
|
-
<span class="ruby-keyword">end</span></pre>
|
145
|
-
</div>
|
146
|
-
|
147
|
-
<div class="method-calls-super">
|
148
|
-
Calls superclass method
|
149
|
-
<a href="Filter_decorator.html#method-c-new"><code>Filter_decorator::new</code></a>
|
150
|
-
</div>
|
151
|
-
</div>
|
152
|
-
|
153
|
-
|
154
|
-
</div>
|
155
|
-
|
156
|
-
</section>
|
157
|
-
|
158
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section anchor-link">
|
159
|
-
<header>
|
160
|
-
<h3>Public Instance Methods</h3>
|
161
|
-
</header>
|
162
|
-
|
163
|
-
<div id="method-i-apply" class="method-detail anchor-link ">
|
164
|
-
<div class="method-header">
|
165
|
-
<div class="method-heading">
|
166
|
-
<a href="#method-i-apply" title="Link to this method">
|
167
|
-
<span class="method-name">apply</span>
|
168
|
-
<span class="method-args">(filtering_obj)</span>
|
169
|
-
</a>
|
170
|
-
</div>
|
171
|
-
</div>
|
172
|
-
|
173
|
-
<div class="method-controls">
|
174
|
-
<details class="method-source-toggle">
|
175
|
-
<summary>Source</summary>
|
176
|
-
</details>
|
177
|
-
</div>
|
178
|
-
|
179
|
-
<div class="method-description">
|
180
|
-
<div class="method-source-code" id="apply-source">
|
181
|
-
<pre><span class="ruby-comment"># File lib/models/filter/student_filters/git_sort_decorator.rb, line 9</span>
|
182
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">apply</span>(<span class="ruby-identifier">filtering_obj</span>)
|
183
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">filtering_obj</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
184
|
-
<span class="ruby-identifier">filtered_students</span> = <span class="ruby-keyword">super</span>(<span class="ruby-identifier">filtering_obj</span>)
|
185
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">filtered_students</span>.<span class="ruby-identifier">nil?</span>
|
186
|
-
<span class="ruby-keyword">return</span> []
|
187
|
-
<span class="ruby-keyword">end</span>
|
188
|
-
|
189
|
-
<span class="ruby-identifier">sorted_students</span> = <span class="ruby-identifier">filtered_students</span>.<span class="ruby-identifier">sort_by</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">student</span><span class="ruby-operator">|</span>
|
190
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">student</span>.<span class="ruby-identifier">git</span>
|
191
|
-
<span class="ruby-constant">String</span>(<span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Float</span><span class="ruby-operator">::</span><span class="ruby-constant">INFINITY</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">downcase</span>)
|
192
|
-
<span class="ruby-keyword">end</span>
|
193
|
-
<span class="ruby-identifier">sorted_students</span>.<span class="ruby-identifier">reverse!</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">order</span> <span class="ruby-operator">==</span> <span class="ruby-value">:desc</span>
|
194
|
-
<span class="ruby-identifier">sorted_students</span>
|
195
|
-
<span class="ruby-keyword">else</span>
|
196
|
-
<span class="ruby-identifier">query</span> = <span class="ruby-keyword">super</span>(<span class="ruby-identifier">filtering_obj</span>)
|
197
|
-
<span class="ruby-node">"#{query} ORDER BY
|
198
|
-
CASE
|
199
|
-
WHEN git IS NULL OR git = '' THEN 1
|
200
|
-
ELSE 0
|
201
|
-
END,
|
202
|
-
git #{self.order == :asc ? 'ASC' : 'DESC' }"</span>
|
203
|
-
<span class="ruby-keyword">end</span>
|
204
|
-
<span class="ruby-keyword">end</span></pre>
|
205
|
-
</div>
|
206
|
-
|
207
|
-
<div class="method-calls-super">
|
208
|
-
Calls superclass method
|
209
|
-
<a href="Filter_decorator.html#method-i-apply"><code>Filter_decorator#apply</code></a>
|
210
|
-
</div>
|
211
|
-
</div>
|
212
|
-
|
213
|
-
|
214
|
-
</div>
|
215
|
-
|
216
|
-
</section>
|
217
|
-
|
218
|
-
</section>
|
219
|
-
</main>
|
220
|
-
|
@@ -1,209 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
-
|
8
|
-
<title>class Has_not_field_filter_decorator - RDoc Documentation</title>
|
9
|
-
|
10
|
-
<meta name="keywords" content="ruby,class,Has_not_field_filter_decorator">
|
11
|
-
|
12
|
-
<meta name="description" content="Documentation for the Has_not_field_filter_decorator class">
|
13
|
-
|
14
|
-
<script type="text/javascript">
|
15
|
-
var rdoc_rel_prefix = "./";
|
16
|
-
var index_rel_prefix = "./";
|
17
|
-
</script>
|
18
|
-
|
19
|
-
<script src="./js/navigation.js" defer></script>
|
20
|
-
<script src="./js/search.js" defer></script>
|
21
|
-
<script src="./js/search_index.js" defer></script>
|
22
|
-
<script src="./js/searcher.js" defer></script>
|
23
|
-
<script src="./js/darkfish.js" defer></script>
|
24
|
-
|
25
|
-
<link href="./css/fonts.css" rel="stylesheet">
|
26
|
-
<link href="./css/rdoc.css" rel="stylesheet">
|
27
|
-
|
28
|
-
|
29
|
-
<body id="top" role="document" class="class">
|
30
|
-
<div id="navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="true" aria-controls="navigation">
|
31
|
-
<span aria-hidden="true">☰</span>
|
32
|
-
</div>
|
33
|
-
|
34
|
-
|
35
|
-
<nav id="navigation" role="navigation">
|
36
|
-
<div id="project-navigation">
|
37
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
38
|
-
<h2>
|
39
|
-
<a href="./index.html" rel="home">Home</a>
|
40
|
-
</h2>
|
41
|
-
|
42
|
-
<div id="table-of-contents-navigation">
|
43
|
-
<a href="./table_of_contents.html#pages">Pages</a>
|
44
|
-
<a href="./table_of_contents.html#classes">Classes</a>
|
45
|
-
<a href="./table_of_contents.html#methods">Methods</a>
|
46
|
-
</div>
|
47
|
-
</div>
|
48
|
-
|
49
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
50
|
-
<form action="#" method="get" accept-charset="utf-8">
|
51
|
-
<div id="search-field-wrapper">
|
52
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
53
|
-
aria-autocomplete="list" aria-controls="search-results"
|
54
|
-
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
55
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
56
|
-
</div>
|
57
|
-
|
58
|
-
<ul id="search-results" aria-label="Search Results"
|
59
|
-
aria-busy="false" aria-expanded="false"
|
60
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
61
|
-
</form>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
</div>
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
<div id="parent-class-section" class="nav-section">
|
69
|
-
<h3>Ancestors</h3>
|
70
|
-
<ul><li><a href="Filter_decorator.html">Filter_decorator</a><ul><li><a href="Filter.html">Filter</a><ul><li>Object</li></ul></li></ul></li></ul>
|
71
|
-
</div>
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<div class="nav-section">
|
77
|
-
<h3>Class Methods</h3>
|
78
|
-
<ul class="link-list" role="directory">
|
79
|
-
<li class="calls-super" ><a href="#method-c-new">new</a></li>
|
80
|
-
</ul>
|
81
|
-
</div>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<div class="nav-section">
|
86
|
-
<h3>Instance Methods</h3>
|
87
|
-
<ul class="link-list" role="directory">
|
88
|
-
<li class="calls-super" ><a href="#method-i-apply">apply</a></li>
|
89
|
-
</ul>
|
90
|
-
</div>
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
<footer id="validator-badges" role="contentinfo">
|
95
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
96
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.8.1.
|
97
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
98
|
-
</footer>
|
99
|
-
|
100
|
-
</nav>
|
101
|
-
|
102
|
-
<main role="main" aria-labelledby="class-Has_not_field_filter_decorator">
|
103
|
-
<h1 id="class-Has_not_field_filter_decorator" class="anchor-link class">
|
104
|
-
class Has_not_field_filter_decorator
|
105
|
-
</h1>
|
106
|
-
|
107
|
-
<section class="description">
|
108
|
-
|
109
|
-
</section>
|
110
|
-
|
111
|
-
<section id="5Buntitled-5D" class="documentation-section anchor-link">
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section anchor-link">
|
118
|
-
<header>
|
119
|
-
<h3>Public Class Methods</h3>
|
120
|
-
</header>
|
121
|
-
|
122
|
-
<div id="method-c-new" class="method-detail anchor-link ">
|
123
|
-
<div class="method-header">
|
124
|
-
<div class="method-heading">
|
125
|
-
<a href="#method-c-new" title="Link to this method">
|
126
|
-
<span class="method-name">new</span>
|
127
|
-
<span class="method-args">(filter, field)</span>
|
128
|
-
</a>
|
129
|
-
</div>
|
130
|
-
</div>
|
131
|
-
|
132
|
-
<div class="method-controls">
|
133
|
-
<details class="method-source-toggle">
|
134
|
-
<summary>Source</summary>
|
135
|
-
</details>
|
136
|
-
</div>
|
137
|
-
|
138
|
-
<div class="method-description">
|
139
|
-
<div class="method-source-code" id="new-source">
|
140
|
-
<pre><span class="ruby-comment"># File lib/models/filter/student_filters/has_not_field_filter_decorator.rb, line 4</span>
|
141
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">filter</span>, <span class="ruby-identifier">field</span>)
|
142
|
-
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">filter</span>)
|
143
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">field</span> = <span class="ruby-identifier">field</span>
|
144
|
-
<span class="ruby-keyword">end</span></pre>
|
145
|
-
</div>
|
146
|
-
|
147
|
-
<div class="method-calls-super">
|
148
|
-
Calls superclass method
|
149
|
-
<a href="Filter_decorator.html#method-c-new"><code>Filter_decorator::new</code></a>
|
150
|
-
</div>
|
151
|
-
</div>
|
152
|
-
|
153
|
-
|
154
|
-
</div>
|
155
|
-
|
156
|
-
</section>
|
157
|
-
|
158
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section anchor-link">
|
159
|
-
<header>
|
160
|
-
<h3>Public Instance Methods</h3>
|
161
|
-
</header>
|
162
|
-
|
163
|
-
<div id="method-i-apply" class="method-detail anchor-link ">
|
164
|
-
<div class="method-header">
|
165
|
-
<div class="method-heading">
|
166
|
-
<a href="#method-i-apply" title="Link to this method">
|
167
|
-
<span class="method-name">apply</span>
|
168
|
-
<span class="method-args">(filtering_obj)</span>
|
169
|
-
</a>
|
170
|
-
</div>
|
171
|
-
</div>
|
172
|
-
|
173
|
-
<div class="method-controls">
|
174
|
-
<details class="method-source-toggle">
|
175
|
-
<summary>Source</summary>
|
176
|
-
</details>
|
177
|
-
</div>
|
178
|
-
|
179
|
-
<div class="method-description">
|
180
|
-
<div class="method-source-code" id="apply-source">
|
181
|
-
<pre><span class="ruby-comment"># File lib/models/filter/student_filters/has_not_field_filter_decorator.rb, line 9</span>
|
182
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">apply</span>(<span class="ruby-identifier">filtering_obj</span>)
|
183
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">filtering_obj</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
184
|
-
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">filtering_obj</span>).<span class="ruby-identifier">select</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">student</span><span class="ruby-operator">|</span>
|
185
|
-
<span class="ruby-identifier">student_value</span> = <span class="ruby-identifier">student</span>.<span class="ruby-identifier">send</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">field</span>).<span class="ruby-identifier">to_s</span>
|
186
|
-
<span class="ruby-identifier">student_value</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">student_value</span>.<span class="ruby-identifier">empty?</span>
|
187
|
-
<span class="ruby-keyword">end</span>
|
188
|
-
<span class="ruby-keyword">else</span>
|
189
|
-
<span class="ruby-identifier">query</span> = <span class="ruby-keyword">super</span>(<span class="ruby-identifier">filtering_obj</span>)
|
190
|
-
<span class="ruby-identifier">condition</span> = <span class="ruby-identifier">query</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">"WHERE"</span>) <span class="ruby-operator">?</span> <span class="ruby-string">"AND"</span> <span class="ruby-operator">:</span> <span class="ruby-string">"WHERE"</span>
|
191
|
-
<span class="ruby-node">"#{query} #{condition} (#{field} = '' OR #{field} IS NULL)"</span>
|
192
|
-
<span class="ruby-keyword">end</span>
|
193
|
-
<span class="ruby-keyword">end</span></pre>
|
194
|
-
</div>
|
195
|
-
|
196
|
-
<div class="method-calls-super">
|
197
|
-
Calls superclass method
|
198
|
-
<a href="Filter_decorator.html#method-i-apply"><code>Filter_decorator#apply</code></a>
|
199
|
-
</div>
|
200
|
-
</div>
|
201
|
-
|
202
|
-
|
203
|
-
</div>
|
204
|
-
|
205
|
-
</section>
|
206
|
-
|
207
|
-
</section>
|
208
|
-
</main>
|
209
|
-
|