apes 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -0
  3. data/.rubocop.yml +82 -0
  4. data/.travis-gemfile +15 -0
  5. data/.travis.yml +15 -0
  6. data/.yardopts +1 -0
  7. data/CHANGELOG.md +3 -0
  8. data/Gemfile +22 -0
  9. data/README.md +177 -0
  10. data/Rakefile +44 -0
  11. data/apes.gemspec +34 -0
  12. data/doc/Apes.html +130 -0
  13. data/doc/Apes/Concerns.html +127 -0
  14. data/doc/Apes/Concerns/Errors.html +1089 -0
  15. data/doc/Apes/Concerns/Pagination.html +636 -0
  16. data/doc/Apes/Concerns/Request.html +766 -0
  17. data/doc/Apes/Concerns/Response.html +940 -0
  18. data/doc/Apes/Controller.html +1100 -0
  19. data/doc/Apes/Errors.html +125 -0
  20. data/doc/Apes/Errors/AuthenticationError.html +133 -0
  21. data/doc/Apes/Errors/BadRequestError.html +157 -0
  22. data/doc/Apes/Errors/BaseError.html +320 -0
  23. data/doc/Apes/Errors/InvalidDataError.html +157 -0
  24. data/doc/Apes/Errors/MissingDataError.html +157 -0
  25. data/doc/Apes/Model.html +378 -0
  26. data/doc/Apes/PaginationCursor.html +2138 -0
  27. data/doc/Apes/RuntimeConfiguration.html +909 -0
  28. data/doc/Apes/Serializers.html +125 -0
  29. data/doc/Apes/Serializers/JSON.html +389 -0
  30. data/doc/Apes/Serializers/JWT.html +452 -0
  31. data/doc/Apes/Serializers/List.html +347 -0
  32. data/doc/Apes/UrlsParser.html +1432 -0
  33. data/doc/Apes/Validators.html +125 -0
  34. data/doc/Apes/Validators/BaseValidator.html +278 -0
  35. data/doc/Apes/Validators/BooleanValidator.html +494 -0
  36. data/doc/Apes/Validators/EmailValidator.html +350 -0
  37. data/doc/Apes/Validators/PhoneValidator.html +375 -0
  38. data/doc/Apes/Validators/ReferenceValidator.html +372 -0
  39. data/doc/Apes/Validators/TimestampValidator.html +640 -0
  40. data/doc/Apes/Validators/UuidValidator.html +372 -0
  41. data/doc/Apes/Validators/ZipCodeValidator.html +372 -0
  42. data/doc/Apes/Version.html +189 -0
  43. data/doc/ApplicationController.html +547 -0
  44. data/doc/Concerns.html +128 -0
  45. data/doc/Concerns/ErrorHandling.html +826 -0
  46. data/doc/Concerns/PaginationHandling.html +463 -0
  47. data/doc/Concerns/RequestHandling.html +512 -0
  48. data/doc/Concerns/ResponseHandling.html +579 -0
  49. data/doc/Errors.html +126 -0
  50. data/doc/Errors/AuthenticationError.html +123 -0
  51. data/doc/Errors/BadRequestError.html +147 -0
  52. data/doc/Errors/BaseError.html +289 -0
  53. data/doc/Errors/InvalidDataError.html +147 -0
  54. data/doc/Errors/MissingDataError.html +147 -0
  55. data/doc/Model.html +315 -0
  56. data/doc/PaginationCursor.html +764 -0
  57. data/doc/Serializers.html +126 -0
  58. data/doc/Serializers/JSON.html +253 -0
  59. data/doc/Serializers/JWT.html +253 -0
  60. data/doc/Serializers/List.html +245 -0
  61. data/doc/Validators.html +126 -0
  62. data/doc/Validators/BaseValidator.html +209 -0
  63. data/doc/Validators/BooleanValidator.html +391 -0
  64. data/doc/Validators/EmailValidator.html +298 -0
  65. data/doc/Validators/PhoneValidator.html +313 -0
  66. data/doc/Validators/ReferenceValidator.html +284 -0
  67. data/doc/Validators/TimestampValidator.html +476 -0
  68. data/doc/Validators/UuidValidator.html +310 -0
  69. data/doc/Validators/ZipCodeValidator.html +310 -0
  70. data/doc/_index.html +435 -0
  71. data/doc/class_list.html +58 -0
  72. data/doc/css/common.css +1 -0
  73. data/doc/css/full_list.css +57 -0
  74. data/doc/css/style.css +339 -0
  75. data/doc/file.README.html +252 -0
  76. data/doc/file_list.html +60 -0
  77. data/doc/frames.html +26 -0
  78. data/doc/index.html +252 -0
  79. data/doc/js/app.js +219 -0
  80. data/doc/js/full_list.js +181 -0
  81. data/doc/js/jquery.js +4 -0
  82. data/doc/method_list.html +615 -0
  83. data/doc/top-level-namespace.html +112 -0
  84. data/lib/apes.rb +40 -0
  85. data/lib/apes/concerns/errors.rb +111 -0
  86. data/lib/apes/concerns/pagination.rb +81 -0
  87. data/lib/apes/concerns/request.rb +237 -0
  88. data/lib/apes/concerns/response.rb +74 -0
  89. data/lib/apes/controller.rb +77 -0
  90. data/lib/apes/errors.rb +38 -0
  91. data/lib/apes/model.rb +94 -0
  92. data/lib/apes/pagination_cursor.rb +152 -0
  93. data/lib/apes/runtime_configuration.rb +80 -0
  94. data/lib/apes/serializers.rb +88 -0
  95. data/lib/apes/urls_parser.rb +233 -0
  96. data/lib/apes/validators.rb +234 -0
  97. data/lib/apes/version.rb +24 -0
  98. data/spec/apes/concerns/errors_spec.rb +141 -0
  99. data/spec/apes/concerns/pagination_spec.rb +114 -0
  100. data/spec/apes/concerns/request_spec.rb +244 -0
  101. data/spec/apes/concerns/response_spec.rb +79 -0
  102. data/spec/apes/controller_spec.rb +54 -0
  103. data/spec/apes/errors_spec.rb +14 -0
  104. data/spec/apes/models_spec.rb +148 -0
  105. data/spec/apes/pagination_cursor_spec.rb +113 -0
  106. data/spec/apes/runtime_configuration_spec.rb +100 -0
  107. data/spec/apes/serializers_spec.rb +70 -0
  108. data/spec/apes/urls_parser_spec.rb +150 -0
  109. data/spec/apes/validators_spec.rb +237 -0
  110. data/spec/spec_helper.rb +30 -0
  111. data/views/_included.json.jbuilder +9 -0
  112. data/views/_pagination.json.jbuilder +9 -0
  113. data/views/collection.json.jbuilder +4 -0
  114. data/views/errors/400.json.jbuilder +9 -0
  115. data/views/errors/403.json.jbuilder +7 -0
  116. data/views/errors/404.json.jbuilder +6 -0
  117. data/views/errors/422.json.jbuilder +19 -0
  118. data/views/errors/500.json.jbuilder +12 -0
  119. data/views/errors/501.json.jbuilder +7 -0
  120. data/views/layouts/general.json.jbuilder +36 -0
  121. data/views/object.json.jbuilder +4 -0
  122. metadata +262 -0
@@ -0,0 +1,157 @@
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
+ Exception: Apes::Errors::InvalidDataError
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
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#!Apes/Errors/InvalidDataError.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 (I)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Apes.html" title="Apes (module)">Apes</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Errors.html" title="Apes::Errors (module)">Errors</a></span></span>
36
+ &raquo;
37
+ <span class="title">InvalidDataError</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>Exception: Apes::Errors::InvalidDataError
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName"><span class='object_link'><a href="BaseError.html" title="Apes::Errors::BaseError (class)">BaseError</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">RuntimeError</li>
82
+
83
+ <li class="next"><span class='object_link'><a href="BaseError.html" title="Apes::Errors::BaseError (class)">BaseError</a></span></li>
84
+
85
+ <li class="next">Apes::Errors::InvalidDataError</li>
86
+
87
+ </ul>
88
+ <a href="#" class="inheritanceTree">show all</a>
89
+
90
+ </dd>
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r2 last">Defined in:</dt>
101
+ <dd class="r2 last">lib/apes/errors.rb</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+ <p>Error raised when the sent data is not valid.</p>
109
+
110
+
111
+ </div>
112
+ </div>
113
+ <div class="tags">
114
+
115
+
116
+ </div>
117
+
118
+
119
+
120
+
121
+
122
+ <h2>Instance Attribute Summary</h2>
123
+
124
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="BaseError.html" title="Apes::Errors::BaseError (class)">BaseError</a></span></h3>
125
+ <p class="inherited"><span class='object_link'><a href="BaseError.html#details-instance_method" title="Apes::Errors::BaseError#details (method)">#details</a></span></p>
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <h2>Method Summary</h2>
136
+
137
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseError.html" title="Apes::Errors::BaseError (class)">BaseError</a></span></h3>
138
+ <p class="inherited"><span class='object_link'><a href="BaseError.html#initialize-instance_method" title="Apes::Errors::BaseError#initialize (method)">#initialize</a></span></p>
139
+
140
+ <div id="constructor_details" class="method_details_list">
141
+ <h2>Constructor Details</h2>
142
+
143
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="BaseError.html#initialize-instance_method" title="Apes::Errors::BaseError#initialize (method)">Apes::Errors::BaseError</a></span></p>
144
+
145
+ </div>
146
+
147
+
148
+ </div>
149
+
150
+ <div id="footer">
151
+ Generated on Sat Jun 4 12:41:53 2016 by
152
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
153
+ 0.8.7.6 (ruby-2.3.0).
154
+ </div>
155
+
156
+ </body>
157
+ </html>
@@ -0,0 +1,157 @@
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
+ Exception: Apes::Errors::MissingDataError
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
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#!Apes/Errors/MissingDataError.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 (M)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Apes.html" title="Apes (module)">Apes</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Errors.html" title="Apes::Errors (module)">Errors</a></span></span>
36
+ &raquo;
37
+ <span class="title">MissingDataError</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>Exception: Apes::Errors::MissingDataError
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName"><span class='object_link'><a href="BaseError.html" title="Apes::Errors::BaseError (class)">BaseError</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">RuntimeError</li>
82
+
83
+ <li class="next"><span class='object_link'><a href="BaseError.html" title="Apes::Errors::BaseError (class)">BaseError</a></span></li>
84
+
85
+ <li class="next">Apes::Errors::MissingDataError</li>
86
+
87
+ </ul>
88
+ <a href="#" class="inheritanceTree">show all</a>
89
+
90
+ </dd>
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dt class="r2 last">Defined in:</dt>
101
+ <dd class="r2 last">lib/apes/errors.rb</dd>
102
+
103
+ </dl>
104
+ <div class="clear"></div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+ <p>Error raised when the sent data is not missing.</p>
109
+
110
+
111
+ </div>
112
+ </div>
113
+ <div class="tags">
114
+
115
+
116
+ </div>
117
+
118
+
119
+
120
+
121
+
122
+ <h2>Instance Attribute Summary</h2>
123
+
124
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="BaseError.html" title="Apes::Errors::BaseError (class)">BaseError</a></span></h3>
125
+ <p class="inherited"><span class='object_link'><a href="BaseError.html#details-instance_method" title="Apes::Errors::BaseError#details (method)">#details</a></span></p>
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <h2>Method Summary</h2>
136
+
137
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseError.html" title="Apes::Errors::BaseError (class)">BaseError</a></span></h3>
138
+ <p class="inherited"><span class='object_link'><a href="BaseError.html#initialize-instance_method" title="Apes::Errors::BaseError#initialize (method)">#initialize</a></span></p>
139
+
140
+ <div id="constructor_details" class="method_details_list">
141
+ <h2>Constructor Details</h2>
142
+
143
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="BaseError.html#initialize-instance_method" title="Apes::Errors::BaseError#initialize (method)">Apes::Errors::BaseError</a></span></p>
144
+
145
+ </div>
146
+
147
+
148
+ </div>
149
+
150
+ <div id="footer">
151
+ Generated on Sat Jun 4 12:41:53 2016 by
152
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
153
+ 0.8.7.6 (ruby-2.3.0).
154
+ </div>
155
+
156
+ </body>
157
+ </html>
@@ -0,0 +1,378 @@
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: Apes::Model
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
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#!Apes/Model.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 (M)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Apes.html" title="Apes (module)">Apes</a></span></span>
36
+ &raquo;
37
+ <span class="title">Model</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: Apes::Model
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+ <dt class="r1">Extended by:</dt>
77
+ <dd class="r1">ActiveSupport::Concern</dd>
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+ <dt class="r2 last">Defined in:</dt>
86
+ <dd class="r2 last">lib/apes/model.rb</dd>
87
+
88
+ </dl>
89
+ <div class="clear"></div>
90
+
91
+ <h2>Overview</h2><div class="docstring">
92
+ <div class="discussion">
93
+ <p>Some utility extensions to ActiveModel.</p>
94
+
95
+
96
+ </div>
97
+ </div>
98
+ <div class="tags">
99
+
100
+
101
+ </div>
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <h2>
110
+ Instance Method Summary
111
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
112
+ </h2>
113
+
114
+ <ul class="summary">
115
+
116
+ <li class="public ">
117
+ <span class="summary_signature">
118
+
119
+ <a href="#additional_errors-instance_method" title="#additional_errors (instance method)">- (ActiveModel::Errors) <strong>additional_errors</strong> </a>
120
+
121
+
122
+
123
+ </span>
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ <span class="summary_desc"><div class='inline'><p>A list of manually managed errors for the model.</p>
134
+ </div></span>
135
+
136
+ </li>
137
+
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#all_validation_errors-instance_method" title="#all_validation_errors (instance method)">- (ActiveModel::Errors) <strong>all_validation_errors</strong> </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'><p>A list of automatically and manually added errors for the model.</p>
157
+ </div></span>
158
+
159
+ </li>
160
+
161
+
162
+ <li class="public ">
163
+ <span class="summary_signature">
164
+
165
+ <a href="#run_validations%21-instance_method" title="#run_validations! (instance method)">- (Object) <strong>run_validations!</strong> </a>
166
+
167
+
168
+
169
+ </span>
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+ <span class="summary_desc"><div class='inline'><p>Perform validations on the model and makes sure manually added errors are included.</p>
180
+ </div></span>
181
+
182
+ </li>
183
+
184
+
185
+ </ul>
186
+
187
+
188
+
189
+
190
+
191
+ <div id="instance_method_details" class="method_details_list">
192
+ <h2>Instance Method Details</h2>
193
+
194
+
195
+ <div class="method_details first">
196
+ <h3 class="signature first" id="additional_errors-instance_method">
197
+
198
+ - (<tt>ActiveModel::Errors</tt>) <strong>additional_errors</strong>
199
+
200
+
201
+
202
+
203
+
204
+ </h3><div class="docstring">
205
+ <div class="discussion">
206
+ <p>A list of manually managed errors for the model.</p>
207
+
208
+
209
+ </div>
210
+ </div>
211
+ <div class="tags">
212
+
213
+ <p class="tag_title">Returns:</p>
214
+ <ul class="return">
215
+
216
+ <li>
217
+
218
+
219
+ <span class='type'>(<tt>ActiveModel::Errors</tt>)</span>
220
+
221
+
222
+
223
+ &mdash;
224
+ <div class='inline'><p>A list of manually managed errors for the model.</p>
225
+ </div>
226
+
227
+ </li>
228
+
229
+ </ul>
230
+
231
+ </div><table class="source_code">
232
+ <tr>
233
+ <td>
234
+ <pre class="lines">
235
+
236
+
237
+ 69
238
+ 70
239
+ 71</pre>
240
+ </td>
241
+ <td>
242
+ <pre class="code"><span class="info file"># File 'lib/apes/model.rb', line 69</span>
243
+
244
+ <span class='kw'>def</span> <span class='id identifier rubyid_additional_errors'>additional_errors</span>
245
+ <span class='ivar'>@additional_errors</span> <span class='op'>||=</span> <span class='const'>ActiveModel</span><span class='op'>::</span><span class='const'>Errors</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
246
+ <span class='kw'>end</span></pre>
247
+ </td>
248
+ </tr>
249
+ </table>
250
+ </div>
251
+
252
+ <div class="method_details ">
253
+ <h3 class="signature " id="all_validation_errors-instance_method">
254
+
255
+ - (<tt>ActiveModel::Errors</tt>) <strong>all_validation_errors</strong>
256
+
257
+
258
+
259
+
260
+
261
+ </h3><div class="docstring">
262
+ <div class="discussion">
263
+ <p>A list of automatically and manually added errors for the model.</p>
264
+
265
+
266
+ </div>
267
+ </div>
268
+ <div class="tags">
269
+
270
+ <p class="tag_title">Returns:</p>
271
+ <ul class="return">
272
+
273
+ <li>
274
+
275
+
276
+ <span class='type'>(<tt>ActiveModel::Errors</tt>)</span>
277
+
278
+
279
+
280
+ &mdash;
281
+ <div class='inline'><p>A list of automatically and manually added errors for the model.</p>
282
+ </div>
283
+
284
+ </li>
285
+
286
+ </ul>
287
+
288
+ </div><table class="source_code">
289
+ <tr>
290
+ <td>
291
+ <pre class="lines">
292
+
293
+
294
+ 82
295
+ 83
296
+ 84
297
+ 85
298
+ 86
299
+ 87
300
+ 88
301
+ 89
302
+ 90
303
+ 91
304
+ 92</pre>
305
+ </td>
306
+ <td>
307
+ <pre class="code"><span class="info file"># File 'lib/apes/model.rb', line 82</span>
308
+
309
+ <span class='kw'>def</span> <span class='id identifier rubyid_all_validation_errors'>all_validation_errors</span>
310
+ <span class='id identifier rubyid_additional_errors'>additional_errors</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_error'>error</span><span class='op'>|</span>
311
+ <span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_error'>error</span><span class='rparen'>)</span>
312
+ <span class='kw'>end</span>
313
+
314
+ <span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_field'>field</span><span class='op'>|</span>
315
+ <span class='id identifier rubyid_errors'>errors</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_uniq!'>uniq!</span>
316
+ <span class='kw'>end</span>
317
+
318
+ <span class='id identifier rubyid_errors'>errors</span>
319
+ <span class='kw'>end</span></pre>
320
+ </td>
321
+ </tr>
322
+ </table>
323
+ </div>
324
+
325
+ <div class="method_details ">
326
+ <h3 class="signature " id="run_validations!-instance_method">
327
+
328
+ - (<tt>Object</tt>) <strong>run_validations!</strong>
329
+
330
+
331
+
332
+
333
+
334
+ </h3><div class="docstring">
335
+ <div class="discussion">
336
+ <p>Perform validations on the model and makes sure manually added errors are included.</p>
337
+
338
+
339
+ </div>
340
+ </div>
341
+ <div class="tags">
342
+
343
+
344
+ </div><table class="source_code">
345
+ <tr>
346
+ <td>
347
+ <pre class="lines">
348
+
349
+
350
+ 74
351
+ 75
352
+ 76
353
+ 77</pre>
354
+ </td>
355
+ <td>
356
+ <pre class="code"><span class="info file"># File 'lib/apes/model.rb', line 74</span>
357
+
358
+ <span class='kw'>def</span> <span class='id identifier rubyid_run_validations!'>run_validations!</span>
359
+ <span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_messages'>messages</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_additional_errors'>additional_errors</span><span class='period'>.</span><span class='id identifier rubyid_messages'>messages</span><span class='rparen'>)</span>
360
+ <span class='kw'>super</span>
361
+ <span class='kw'>end</span></pre>
362
+ </td>
363
+ </tr>
364
+ </table>
365
+ </div>
366
+
367
+ </div>
368
+
369
+ </div>
370
+
371
+ <div id="footer">
372
+ Generated on Sat Jun 4 12:41:53 2016 by
373
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
374
+ 0.8.7.6 (ruby-2.3.0).
375
+ </div>
376
+
377
+ </body>
378
+ </html>