student_mvp 0.1.7 → 0.1.9
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 +36 -1
- data/lib/student_mvp/version.rb +1 -1
- metadata +55 -34
- 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/StudentMvp/Error.html
DELETED
@@ -1,105 +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 StudentMvp::Error - RDoc Documentation</title>
|
9
|
-
|
10
|
-
<meta name="keywords" content="ruby,class,StudentMvp::Error">
|
11
|
-
|
12
|
-
<meta name="description" content="Documentation for the StudentMvp::Error 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>StandardError</li></ul>
|
71
|
-
</div>
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
<footer id="validator-badges" role="contentinfo">
|
81
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
82
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.8.1.
|
83
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
84
|
-
</footer>
|
85
|
-
|
86
|
-
</nav>
|
87
|
-
|
88
|
-
<main role="main" aria-labelledby="class-StudentMvp::Error">
|
89
|
-
<h1 id="class-StudentMvp::Error" class="anchor-link class">
|
90
|
-
class StudentMvp::Error
|
91
|
-
</h1>
|
92
|
-
|
93
|
-
<section class="description">
|
94
|
-
|
95
|
-
</section>
|
96
|
-
|
97
|
-
<section id="5Buntitled-5D" class="documentation-section anchor-link">
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
</section>
|
104
|
-
</main>
|
105
|
-
|
data/doc/StudentMvp.html
DELETED
@@ -1,111 +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>module StudentMvp - RDoc Documentation</title>
|
9
|
-
|
10
|
-
<meta name="keywords" content="ruby,module,StudentMvp">
|
11
|
-
|
12
|
-
<meta name="description" content="Documentation for the StudentMvp module">
|
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="module">
|
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
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<footer id="validator-badges" role="contentinfo">
|
77
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
78
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.8.1.
|
79
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
80
|
-
</footer>
|
81
|
-
|
82
|
-
</nav>
|
83
|
-
|
84
|
-
<main role="main" aria-labelledby="module-StudentMvp">
|
85
|
-
<h1 id="module-StudentMvp" class="anchor-link module">
|
86
|
-
module StudentMvp
|
87
|
-
</h1>
|
88
|
-
|
89
|
-
<section class="description">
|
90
|
-
|
91
|
-
</section>
|
92
|
-
|
93
|
-
<section id="5Buntitled-5D" class="documentation-section anchor-link">
|
94
|
-
|
95
|
-
|
96
|
-
<section class="constants-list">
|
97
|
-
<header>
|
98
|
-
<h3>Constants</h3>
|
99
|
-
</header>
|
100
|
-
<dl>
|
101
|
-
<dt id="VERSION">VERSION
|
102
|
-
<dd>
|
103
|
-
|
104
|
-
</dl>
|
105
|
-
</section>
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
</section>
|
110
|
-
</main>
|
111
|
-
|
data/doc/Student_short.html
DELETED
@@ -1,398 +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 Student_short - RDoc Documentation</title>
|
9
|
-
|
10
|
-
<meta name="keywords" content="ruby,class,Student_short">
|
11
|
-
|
12
|
-
<meta name="description" content="Documentation for the Student_short 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="Person.html">Person</a><ul><li>Object</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 ><a href="#method-c-new">new</a></li>
|
80
|
-
<li ><a href="#method-c-new_from_string">new_from_string</a></li>
|
81
|
-
<li ><a href="#method-c-new_from_student_obj">new_from_student_obj</a></li>
|
82
|
-
<li ><a href="#method-c-valid_name-3F">valid_name?</a></li>
|
83
|
-
</ul>
|
84
|
-
</div>
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
<div class="nav-section">
|
89
|
-
<h3>Instance Methods</h3>
|
90
|
-
<ul class="link-list" role="directory">
|
91
|
-
<li ><a href="#method-i-get_any_contact">get_any_contact</a></li>
|
92
|
-
<li class="calls-super" ><a href="#method-i-validate-3F">validate?</a></li>
|
93
|
-
<li ><a href="#method-i-validate_contacts-3F">validate_contacts?</a></li>
|
94
|
-
</ul>
|
95
|
-
</div>
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
<footer id="validator-badges" role="contentinfo">
|
100
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
101
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.8.1.
|
102
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
103
|
-
</footer>
|
104
|
-
|
105
|
-
</nav>
|
106
|
-
|
107
|
-
<main role="main" aria-labelledby="class-Student_short">
|
108
|
-
<h1 id="class-Student_short" class="anchor-link class">
|
109
|
-
class Student_short
|
110
|
-
</h1>
|
111
|
-
|
112
|
-
<section class="description">
|
113
|
-
|
114
|
-
</section>
|
115
|
-
|
116
|
-
<section id="5Buntitled-5D" class="documentation-section anchor-link">
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
<section class="attribute-method-details" class="method-section">
|
121
|
-
<header>
|
122
|
-
<h3>Attributes</h3>
|
123
|
-
</header>
|
124
|
-
|
125
|
-
<div id="attribute-i-full_name" class="method-detail anchor-link">
|
126
|
-
<div class="method-heading attribute-method-heading">
|
127
|
-
<a href="#attribute-i-full_name" title="Link to this attribute">
|
128
|
-
<span class="method-name">full_name</span>
|
129
|
-
<span class="attribute-access-type">[R]</span>
|
130
|
-
</a>
|
131
|
-
</div>
|
132
|
-
|
133
|
-
<div class="method-description">
|
134
|
-
|
135
|
-
</div>
|
136
|
-
</div>
|
137
|
-
<div id="attribute-i-id" class="method-detail anchor-link">
|
138
|
-
<div class="method-heading attribute-method-heading">
|
139
|
-
<a href="#attribute-i-id" title="Link to this attribute">
|
140
|
-
<span class="method-name">id</span>
|
141
|
-
<span class="attribute-access-type">[RW]</span>
|
142
|
-
</a>
|
143
|
-
</div>
|
144
|
-
|
145
|
-
<div class="method-description">
|
146
|
-
|
147
|
-
</div>
|
148
|
-
</div>
|
149
|
-
</section>
|
150
|
-
|
151
|
-
|
152
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section anchor-link">
|
153
|
-
<header>
|
154
|
-
<h3>Public Class Methods</h3>
|
155
|
-
</header>
|
156
|
-
|
157
|
-
<div id="method-c-new" class="method-detail anchor-link ">
|
158
|
-
<div class="method-header">
|
159
|
-
<div class="method-heading">
|
160
|
-
<a href="#method-c-new" title="Link to this method">
|
161
|
-
<span class="method-name">new</span>
|
162
|
-
<span class="method-args">(full_name:, git:, contact:, id: nil)</span>
|
163
|
-
</a>
|
164
|
-
</div>
|
165
|
-
</div>
|
166
|
-
|
167
|
-
<div class="method-controls">
|
168
|
-
<details class="method-source-toggle">
|
169
|
-
<summary>Source</summary>
|
170
|
-
</details>
|
171
|
-
</div>
|
172
|
-
|
173
|
-
<div class="method-description">
|
174
|
-
<div class="method-source-code" id="new-source">
|
175
|
-
<pre><span class="ruby-comment"># File lib/models/student_short/student_short.rb, line 7</span>
|
176
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-value">full_name:</span>, <span class="ruby-value">git:</span>, <span class="ruby-value">contact:</span>, <span class="ruby-value">id:</span> <span class="ruby-keyword">nil</span>)
|
177
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">id</span> = <span class="ruby-identifier">id</span>
|
178
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">full_name</span> = <span class="ruby-identifier">full_name</span>
|
179
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">git</span> = <span class="ruby-identifier">git</span>
|
180
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">set_contacts</span>(<span class="ruby-identifier">contact</span>)
|
181
|
-
<span class="ruby-keyword">end</span></pre>
|
182
|
-
</div>
|
183
|
-
|
184
|
-
</div>
|
185
|
-
|
186
|
-
|
187
|
-
</div>
|
188
|
-
|
189
|
-
<div id="method-c-new_from_string" class="method-detail anchor-link ">
|
190
|
-
<div class="method-header">
|
191
|
-
<div class="method-heading">
|
192
|
-
<a href="#method-c-new_from_string" title="Link to this method">
|
193
|
-
<span class="method-name">new_from_string</span>
|
194
|
-
<span class="method-args">(id, string)</span>
|
195
|
-
</a>
|
196
|
-
</div>
|
197
|
-
</div>
|
198
|
-
|
199
|
-
<div class="method-controls">
|
200
|
-
<details class="method-source-toggle">
|
201
|
-
<summary>Source</summary>
|
202
|
-
</details>
|
203
|
-
</div>
|
204
|
-
|
205
|
-
<div class="method-description">
|
206
|
-
<div class="method-source-code" id="new_from_string-source">
|
207
|
-
<pre><span class="ruby-comment"># File lib/models/student_short/student_short.rb, line 25</span>
|
208
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">new_from_string</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">string</span>)
|
209
|
-
<span class="ruby-identifier">hash</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">parse_string</span>(<span class="ruby-identifier">string</span>)
|
210
|
-
<span class="ruby-identifier">contact</span> = <span class="ruby-string">''</span>
|
211
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">hash</span>[<span class="ruby-string">'telegram'</span>] <span class="ruby-keyword">then</span>
|
212
|
-
<span class="ruby-identifier">contact</span> = <span class="ruby-node">"telegram: #{hash['telegram']}"</span>
|
213
|
-
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">hash</span>[<span class="ruby-string">'email'</span>]
|
214
|
-
<span class="ruby-identifier">contact</span> = <span class="ruby-node">"email: #{hash['email']}"</span>
|
215
|
-
<span class="ruby-keyword">else</span>
|
216
|
-
<span class="ruby-identifier">contact</span> = <span class="ruby-node">"phone_number #{hash['phone_number']}"</span>
|
217
|
-
<span class="ruby-keyword">end</span>
|
218
|
-
|
219
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">new</span>(
|
220
|
-
<span class="ruby-value">id:</span> <span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_i</span>,
|
221
|
-
<span class="ruby-value">full_name:</span> <span class="ruby-identifier">hash</span>[<span class="ruby-string">'full_name'</span>],
|
222
|
-
<span class="ruby-value">git:</span> <span class="ruby-identifier">hash</span>[<span class="ruby-string">'git'</span>],
|
223
|
-
<span class="ruby-value">contact:</span> <span class="ruby-identifier">contact</span>
|
224
|
-
)
|
225
|
-
<span class="ruby-keyword">end</span></pre>
|
226
|
-
</div>
|
227
|
-
<p>constructor from string</p>
|
228
|
-
</div>
|
229
|
-
|
230
|
-
|
231
|
-
</div>
|
232
|
-
|
233
|
-
<div id="method-c-new_from_student_obj" class="method-detail anchor-link ">
|
234
|
-
<div class="method-header">
|
235
|
-
<div class="method-heading">
|
236
|
-
<a href="#method-c-new_from_student_obj" title="Link to this method">
|
237
|
-
<span class="method-name">new_from_student_obj</span>
|
238
|
-
<span class="method-args">(student)</span>
|
239
|
-
</a>
|
240
|
-
</div>
|
241
|
-
</div>
|
242
|
-
|
243
|
-
<div class="method-controls">
|
244
|
-
<details class="method-source-toggle">
|
245
|
-
<summary>Source</summary>
|
246
|
-
</details>
|
247
|
-
</div>
|
248
|
-
|
249
|
-
<div class="method-description">
|
250
|
-
<div class="method-source-code" id="new_from_student_obj-source">
|
251
|
-
<pre><span class="ruby-comment"># File lib/models/student_short/student_short.rb, line 15</span>
|
252
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">new_from_student_obj</span>(<span class="ruby-identifier">student</span>)
|
253
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">new</span>(
|
254
|
-
<span class="ruby-value">id:</span> <span class="ruby-identifier">student</span>.<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_i</span>,
|
255
|
-
<span class="ruby-value">full_name:</span> <span class="ruby-identifier">student</span>.<span class="ruby-identifier">get_full_name</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-value">11</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>),
|
256
|
-
<span class="ruby-value">git:</span> <span class="ruby-identifier">student</span>.<span class="ruby-identifier">git</span>,
|
257
|
-
<span class="ruby-value">contact:</span> <span class="ruby-identifier">student</span>.<span class="ruby-identifier">get_any_contact</span>
|
258
|
-
)
|
259
|
-
<span class="ruby-keyword">end</span></pre>
|
260
|
-
</div>
|
261
|
-
<p>constructor from <a href="Student.html"><code>Student</code></a> object</p>
|
262
|
-
</div>
|
263
|
-
|
264
|
-
|
265
|
-
</div>
|
266
|
-
|
267
|
-
<div id="method-c-valid_name-3F" class="method-detail anchor-link ">
|
268
|
-
<div class="method-header">
|
269
|
-
<div class="method-heading">
|
270
|
-
<a href="#method-c-valid_name-3F" title="Link to this method">
|
271
|
-
<span class="method-name">valid_name?</span>
|
272
|
-
<span class="method-args">(name)</span>
|
273
|
-
</a>
|
274
|
-
</div>
|
275
|
-
</div>
|
276
|
-
|
277
|
-
<div class="method-controls">
|
278
|
-
<details class="method-source-toggle">
|
279
|
-
<summary>Source</summary>
|
280
|
-
</details>
|
281
|
-
</div>
|
282
|
-
|
283
|
-
<div class="method-description">
|
284
|
-
<div class="method-source-code" id="valid_name-3F-source">
|
285
|
-
<pre><span class="ruby-comment"># File lib/models/student_short/student_short.rb, line 95</span>
|
286
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">valid_name?</span>(<span class="ruby-identifier">name</span>)
|
287
|
-
<span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/^[А-ЯЁ][а-яё]{1,}(-[А-ЯЁ][а-яё]{1,})?\s[А-ЯЁ].\s?[А-ЯЁ].$/</span>
|
288
|
-
<span class="ruby-keyword">end</span></pre>
|
289
|
-
</div>
|
290
|
-
<p>full name validation</p>
|
291
|
-
</div>
|
292
|
-
|
293
|
-
|
294
|
-
</div>
|
295
|
-
|
296
|
-
</section>
|
297
|
-
|
298
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section anchor-link">
|
299
|
-
<header>
|
300
|
-
<h3>Public Instance Methods</h3>
|
301
|
-
</header>
|
302
|
-
|
303
|
-
<div id="method-i-get_any_contact" class="method-detail anchor-link ">
|
304
|
-
<div class="method-header">
|
305
|
-
<div class="method-heading">
|
306
|
-
<a href="#method-i-get_any_contact" title="Link to this method">
|
307
|
-
<span class="method-name">get_any_contact</span>
|
308
|
-
<span class="method-args">()</span>
|
309
|
-
</a>
|
310
|
-
</div>
|
311
|
-
</div>
|
312
|
-
|
313
|
-
<div class="method-controls">
|
314
|
-
<details class="method-source-toggle">
|
315
|
-
<summary>Source</summary>
|
316
|
-
</details>
|
317
|
-
</div>
|
318
|
-
|
319
|
-
<div class="method-description">
|
320
|
-
<div class="method-source-code" id="get_any_contact-source">
|
321
|
-
<pre><span class="ruby-comment"># File lib/models/student_short/student_short.rb, line 54</span>
|
322
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_any_contact</span>
|
323
|
-
<span class="ruby-ivar">@contact</span>
|
324
|
-
<span class="ruby-keyword">end</span></pre>
|
325
|
-
</div>
|
326
|
-
|
327
|
-
</div>
|
328
|
-
|
329
|
-
|
330
|
-
</div>
|
331
|
-
|
332
|
-
<div id="method-i-validate-3F" class="method-detail anchor-link ">
|
333
|
-
<div class="method-header">
|
334
|
-
<div class="method-heading">
|
335
|
-
<a href="#method-i-validate-3F" title="Link to this method">
|
336
|
-
<span class="method-name">validate?</span>
|
337
|
-
<span class="method-args">()</span>
|
338
|
-
</a>
|
339
|
-
</div>
|
340
|
-
</div>
|
341
|
-
|
342
|
-
<div class="method-controls">
|
343
|
-
<details class="method-source-toggle">
|
344
|
-
<summary>Source</summary>
|
345
|
-
</details>
|
346
|
-
</div>
|
347
|
-
|
348
|
-
<div class="method-description">
|
349
|
-
<div class="method-source-code" id="validate-3F-source">
|
350
|
-
<pre><span class="ruby-comment"># File lib/models/student_short/student_short.rb, line 50</span>
|
351
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">validate?</span>
|
352
|
-
<span class="ruby-keyword">super</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">validate_contacts?</span>
|
353
|
-
<span class="ruby-keyword">end</span></pre>
|
354
|
-
</div>
|
355
|
-
<p>validate git and contacts</p>
|
356
|
-
<div class="method-calls-super">
|
357
|
-
Calls superclass method
|
358
|
-
<a href="Person.html#method-i-validate-3F"><code>Person#validate?</code></a>
|
359
|
-
</div>
|
360
|
-
</div>
|
361
|
-
|
362
|
-
|
363
|
-
</div>
|
364
|
-
|
365
|
-
<div id="method-i-validate_contacts-3F" class="method-detail anchor-link ">
|
366
|
-
<div class="method-header">
|
367
|
-
<div class="method-heading">
|
368
|
-
<a href="#method-i-validate_contacts-3F" title="Link to this method">
|
369
|
-
<span class="method-name">validate_contacts?</span>
|
370
|
-
<span class="method-args">()</span>
|
371
|
-
</a>
|
372
|
-
</div>
|
373
|
-
</div>
|
374
|
-
|
375
|
-
<div class="method-controls">
|
376
|
-
<details class="method-source-toggle">
|
377
|
-
<summary>Source</summary>
|
378
|
-
</details>
|
379
|
-
</div>
|
380
|
-
|
381
|
-
<div class="method-description">
|
382
|
-
<div class="method-source-code" id="validate_contacts-3F-source">
|
383
|
-
<pre><span class="ruby-comment"># File lib/models/student_short/student_short.rb, line 45</span>
|
384
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">validate_contacts?</span>
|
385
|
-
<span class="ruby-operator">!</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">get_any_contact</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">get_any_contact</span> <span class="ruby-operator">==</span> <span class="ruby-string">""</span>)
|
386
|
-
<span class="ruby-keyword">end</span></pre>
|
387
|
-
</div>
|
388
|
-
<p>checking for contacts availability</p>
|
389
|
-
</div>
|
390
|
-
|
391
|
-
|
392
|
-
</div>
|
393
|
-
|
394
|
-
</section>
|
395
|
-
|
396
|
-
</section>
|
397
|
-
</main>
|
398
|
-
|