tainted_love 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/probots.yml +2 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.rubocop.yml +1188 -0
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +73 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +57 -0
- data/LICENSE.txt +21 -0
- data/README.md +85 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +10 -0
- data/bin/test +7 -0
- data/dev.yml +28 -0
- data/docs/TaintedLove.html +482 -0
- data/docs/TaintedLove/Configuration.html +499 -0
- data/docs/TaintedLove/Replacer.html +129 -0
- data/docs/TaintedLove/Replacer/ActionViewHelpersMod.html +230 -0
- data/docs/TaintedLove/Replacer/Base.html +320 -0
- data/docs/TaintedLove/Replacer/HelperMod.html +226 -0
- data/docs/TaintedLove/Replacer/HelpersMod.html +230 -0
- data/docs/TaintedLove/Replacer/MarshalMod.html +178 -0
- data/docs/TaintedLove/Replacer/ObjectMod.html +282 -0
- data/docs/TaintedLove/Replacer/ReplaceActionController.html +329 -0
- data/docs/TaintedLove/Replacer/ReplaceActionView.html +317 -0
- data/docs/TaintedLove/Replacer/ReplaceActiveRecord.html +341 -0
- data/docs/TaintedLove/Replacer/ReplaceDigest.html +369 -0
- data/docs/TaintedLove/Replacer/ReplaceFile.html +245 -0
- data/docs/TaintedLove/Replacer/ReplaceKernel.html +211 -0
- data/docs/TaintedLove/Replacer/ReplaceMarshal.html +219 -0
- data/docs/TaintedLove/Replacer/ReplaceObject.html +231 -0
- data/docs/TaintedLove/Replacer/ReplaceRailsUserInput.html +374 -0
- data/docs/TaintedLove/Replacer/ReplaceSprokets.html +297 -0
- data/docs/TaintedLove/Replacer/SprocketsHelperMod.html +226 -0
- data/docs/TaintedLove/Reporter.html +117 -0
- data/docs/TaintedLove/Reporter/Base.html +466 -0
- data/docs/TaintedLove/Reporter/RackReporter.html +309 -0
- data/docs/TaintedLove/Reporter/SinatraReporter.html +402 -0
- data/docs/TaintedLove/Reporter/SinatraReporter/App.html +210 -0
- data/docs/TaintedLove/Reporter/StdoutReporter.html +305 -0
- data/docs/TaintedLove/SinatraReporter.html +387 -0
- data/docs/TaintedLove/SinatraReporter/App.html +210 -0
- data/docs/TaintedLove/StackTrace.html +650 -0
- data/docs/TaintedLove/Utils.html +550 -0
- data/docs/TaintedLove/Validator.html +129 -0
- data/docs/TaintedLove/Validator/ActionViewObjectSend.html +233 -0
- data/docs/TaintedLove/Validator/Base.html +200 -0
- data/docs/TaintedLove/Validator/ErbEval.html +229 -0
- data/docs/TaintedLove/Validator/RedisStoreSerialization.html +238 -0
- data/docs/TaintedLove/Validator/SproketsMarshal.html +233 -0
- data/docs/TaintedLove/Warning.html +665 -0
- data/docs/_index.html +371 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.README.html +134 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +134 -0
- data/docs/js/app.js +292 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +523 -0
- data/docs/top-level-namespace.html +110 -0
- data/example/.gitignore +31 -0
- data/example/.ruby-version +1 -0
- data/example/Gemfile +67 -0
- data/example/Gemfile.lock +226 -0
- data/example/README.md +24 -0
- data/example/Rakefile +8 -0
- data/example/app/assets/config/manifest.js +3 -0
- data/example/app/assets/images/.keep +0 -0
- data/example/app/assets/javascripts/application.js +16 -0
- data/example/app/assets/javascripts/cable.js +13 -0
- data/example/app/assets/javascripts/channels/.keep +0 -0
- data/example/app/assets/javascripts/products.coffee +3 -0
- data/example/app/assets/stylesheets/application.css +15 -0
- data/example/app/assets/stylesheets/products.scss +3 -0
- data/example/app/assets/stylesheets/scaffolds.scss +84 -0
- data/example/app/channels/application_cable/channel.rb +6 -0
- data/example/app/channels/application_cable/connection.rb +6 -0
- data/example/app/controllers/application_controller.rb +4 -0
- data/example/app/controllers/concerns/.keep +0 -0
- data/example/app/controllers/products_controller.rb +77 -0
- data/example/app/controllers/test_cases_controller.rb +20 -0
- data/example/app/helpers/application_helper.rb +4 -0
- data/example/app/helpers/products_helper.rb +4 -0
- data/example/app/helpers/test_cases_helper.rb +4 -0
- data/example/app/jobs/application_job.rb +4 -0
- data/example/app/mailers/application_mailer.rb +6 -0
- data/example/app/models/application_record.rb +5 -0
- data/example/app/models/concerns/.keep +0 -0
- data/example/app/models/product.rb +4 -0
- data/example/app/views/layouts/application.html.erb +15 -0
- data/example/app/views/layouts/mailer.html.erb +13 -0
- data/example/app/views/layouts/mailer.text.erb +1 -0
- data/example/app/views/products/_form.html.erb +32 -0
- data/example/app/views/products/_product.json.jbuilder +4 -0
- data/example/app/views/products/edit.html.erb +6 -0
- data/example/app/views/products/index.html.erb +31 -0
- data/example/app/views/products/index.json.jbuilder +3 -0
- data/example/app/views/products/new.html.erb +5 -0
- data/example/app/views/products/show.html.erb +19 -0
- data/example/app/views/products/show.json.jbuilder +3 -0
- data/example/app/views/test_cases/xss.html.erb +10 -0
- data/example/bin/bundle +5 -0
- data/example/bin/rails +11 -0
- data/example/bin/rake +11 -0
- data/example/bin/setup +38 -0
- data/example/bin/spring +18 -0
- data/example/bin/update +33 -0
- data/example/bin/yarn +11 -0
- data/example/config.ru +7 -0
- data/example/config/application.rb +21 -0
- data/example/config/boot.rb +6 -0
- data/example/config/cable.yml +10 -0
- data/example/config/credentials.yml.enc +1 -0
- data/example/config/database.yml +25 -0
- data/example/config/environment.rb +7 -0
- data/example/config/environments/development.rb +63 -0
- data/example/config/environments/production.rb +96 -0
- data/example/config/environments/test.rb +48 -0
- data/example/config/initializers/application_controller_renderer.rb +10 -0
- data/example/config/initializers/assets.rb +16 -0
- data/example/config/initializers/backtrace_silencers.rb +9 -0
- data/example/config/initializers/content_security_policy.rb +27 -0
- data/example/config/initializers/cookies_serializer.rb +7 -0
- data/example/config/initializers/filter_parameter_logging.rb +6 -0
- data/example/config/initializers/inflections.rb +18 -0
- data/example/config/initializers/mime_types.rb +6 -0
- data/example/config/initializers/tainted_love.rb +7 -0
- data/example/config/initializers/wrap_parameters.rb +16 -0
- data/example/config/locales/en.yml +33 -0
- data/example/config/puma.rb +36 -0
- data/example/config/routes.rb +10 -0
- data/example/config/spring.rb +8 -0
- data/example/config/storage.yml +34 -0
- data/example/db/migrate/20190311220346_create_products.rb +13 -0
- data/example/db/schema.rb +23 -0
- data/example/db/seeds.rb +9 -0
- data/example/lib/assets/.keep +0 -0
- data/example/lib/tasks/.keep +0 -0
- data/example/log/.keep +0 -0
- data/example/package.json +5 -0
- data/example/public/404.html +67 -0
- data/example/public/422.html +67 -0
- data/example/public/500.html +66 -0
- data/example/public/apple-touch-icon-precomposed.png +0 -0
- data/example/public/apple-touch-icon.png +0 -0
- data/example/public/favicon.ico +0 -0
- data/example/public/robots.txt +1 -0
- data/example/storage/.keep +0 -0
- data/example/test/application_system_test_case.rb +7 -0
- data/example/test/controllers/.keep +0 -0
- data/example/test/controllers/products_controller_test.rb +66 -0
- data/example/test/controllers/test_cases_controller_test.rb +39 -0
- data/example/test/fixtures/.keep +0 -0
- data/example/test/fixtures/files/.keep +0 -0
- data/example/test/fixtures/products.yml +11 -0
- data/example/test/helpers/.keep +0 -0
- data/example/test/integration/.keep +0 -0
- data/example/test/mailers/.keep +0 -0
- data/example/test/models/.keep +0 -0
- data/example/test/models/product_test.rb +9 -0
- data/example/test/replacers/replace_active_record_test.rb +31 -0
- data/example/test/replacers/replace_sprokets_test.rb +8 -0
- data/example/test/system/.keep +0 -0
- data/example/test/system/products_test.rb +49 -0
- data/example/test/test_helper.rb +37 -0
- data/example/tmp/.keep +0 -0
- data/example/vendor/.keep +0 -0
- data/lib/tainted_love.rb +57 -0
- data/lib/tainted_love/configuration.rb +16 -0
- data/lib/tainted_love/replacer/base.rb +25 -0
- data/lib/tainted_love/replacer/replace_action_controller.rb +61 -0
- data/lib/tainted_love/replacer/replace_action_view.rb +39 -0
- data/lib/tainted_love/replacer/replace_active_record.rb +47 -0
- data/lib/tainted_love/replacer/replace_digest.rb +39 -0
- data/lib/tainted_love/replacer/replace_file.rb +32 -0
- data/lib/tainted_love/replacer/replace_kernel.rb +44 -0
- data/lib/tainted_love/replacer/replace_marshal.rb +19 -0
- data/lib/tainted_love/replacer/replace_object.rb +30 -0
- data/lib/tainted_love/replacer/replace_rails_user_input.rb +59 -0
- data/lib/tainted_love/replacer/replace_sprokets.rb +25 -0
- data/lib/tainted_love/replacer/replace_yaml.rb +28 -0
- data/lib/tainted_love/reporter/base.rb +47 -0
- data/lib/tainted_love/reporter/file_reporter.rb +28 -0
- data/lib/tainted_love/reporter/stdout_reporter.rb +30 -0
- data/lib/tainted_love/stack_trace.rb +46 -0
- data/lib/tainted_love/utils.rb +80 -0
- data/lib/tainted_love/validator/action_view_object_send.rb +15 -0
- data/lib/tainted_love/validator/base.rb +16 -0
- data/lib/tainted_love/validator/erb_eval.rb +13 -0
- data/lib/tainted_love/validator/redis_store_serialization.rb +13 -0
- data/lib/tainted_love/validator/sprokets_marshal.rb +15 -0
- data/lib/tainted_love/version.rb +5 -0
- data/lib/tainted_love/warning.rb +30 -0
- data/tainted_love.gemspec +31 -0
- metadata +315 -0
@@ -0,0 +1,219 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: TaintedLove::Replacer::ReplaceMarshal
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.18
|
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
|
+
pathId = "TaintedLove::Replacer::ReplaceMarshal";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../_index.html">Index (R)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../TaintedLove.html" title="TaintedLove (module)">TaintedLove</a></span></span> » <span class='title'><span class='object_link'><a href="../Replacer.html" title="TaintedLove::Replacer (module)">Replacer</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">ReplaceMarshal</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: TaintedLove::Replacer::ReplaceMarshal
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></li>
|
78
|
+
|
79
|
+
<li class="next">TaintedLove::Replacer::ReplaceMarshal</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/tainted_love/replacer/replace_marshal.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
<h2>
|
113
|
+
Instance Method Summary
|
114
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
115
|
+
</h2>
|
116
|
+
|
117
|
+
<ul class="summary">
|
118
|
+
|
119
|
+
<li class="public ">
|
120
|
+
<span class="summary_signature">
|
121
|
+
|
122
|
+
<a href="#replace!-instance_method" title="#replace! (instance method)">#<strong>replace!</strong> ⇒ Object </a>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
</span>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
137
|
+
|
138
|
+
</li>
|
139
|
+
|
140
|
+
|
141
|
+
</ul>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></h3>
|
154
|
+
<p class="inherited"><span class='object_link'><a href="Base.html#replacers-class_method" title="TaintedLove::Replacer::Base.replacers (method)">replacers</a></span>, <span class='object_link'><a href="Base.html#should_replace%3F-instance_method" title="TaintedLove::Replacer::Base#should_replace? (method)">#should_replace?</a></span></p>
|
155
|
+
|
156
|
+
|
157
|
+
<div id="instance_method_details" class="method_details_list">
|
158
|
+
<h2>Instance Method Details</h2>
|
159
|
+
|
160
|
+
|
161
|
+
<div class="method_details first">
|
162
|
+
<h3 class="signature first" id="replace!-instance_method">
|
163
|
+
|
164
|
+
#<strong>replace!</strong> ⇒ <tt>Object</tt>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
</h3><table class="source_code">
|
171
|
+
<tr>
|
172
|
+
<td>
|
173
|
+
<pre class="lines">
|
174
|
+
|
175
|
+
|
176
|
+
6
|
177
|
+
7
|
178
|
+
8
|
179
|
+
9
|
180
|
+
10
|
181
|
+
11
|
182
|
+
12
|
183
|
+
13
|
184
|
+
14
|
185
|
+
15
|
186
|
+
16</pre>
|
187
|
+
</td>
|
188
|
+
<td>
|
189
|
+
<pre class="code"><span class="info file"># File 'lib/tainted_love/replacer/replace_marshal.rb', line 6</span>
|
190
|
+
|
191
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_replace!'>replace!</span>
|
192
|
+
<span class='id identifier rubyid_mod'>mod</span> <span class='op'>=</span> <span class='const'>Module</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span>
|
193
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_source'>source</span><span class='comma'>,</span> <span class='id identifier rubyid_proc'>proc</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
194
|
+
<span class='const'><span class='object_link'><a href="../../TaintedLove.html" title="TaintedLove (module)">TaintedLove</a></span></span><span class='period'>.</span><span class='id identifier rubyid_report'><span class='object_link'><a href="../../TaintedLove.html#report-class_method" title="TaintedLove.report (method)">report</a></span></span><span class='lparen'>(</span><span class='symbol'>:ReplaceMarshal</span><span class='comma'>,</span> <span class='id identifier rubyid_source'>source</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_source'>source</span><span class='period'>.</span><span class='id identifier rubyid_tainted?'>tainted?</span>
|
195
|
+
|
196
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_source'>source</span><span class='comma'>,</span> <span class='id identifier rubyid_proc'>proc</span><span class='rparen'>)</span>
|
197
|
+
<span class='kw'>end</span>
|
198
|
+
<span class='kw'>end</span>
|
199
|
+
|
200
|
+
<span class='const'>Marshal</span><span class='period'>.</span><span class='id identifier rubyid_singleton_class'>singleton_class</span><span class='period'>.</span><span class='id identifier rubyid_prepend'>prepend</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
|
201
|
+
<span class='kw'>end</span></pre>
|
202
|
+
</td>
|
203
|
+
</tr>
|
204
|
+
</table>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
</div>
|
208
|
+
|
209
|
+
</div>
|
210
|
+
|
211
|
+
<div id="footer">
|
212
|
+
Generated on Tue Apr 2 15:50:34 2019 by
|
213
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
214
|
+
0.9.18 (ruby-2.5.3).
|
215
|
+
</div>
|
216
|
+
|
217
|
+
</div>
|
218
|
+
</body>
|
219
|
+
</html>
|
@@ -0,0 +1,231 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: TaintedLove::Replacer::ReplaceObject
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.18
|
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
|
+
pathId = "TaintedLove::Replacer::ReplaceObject";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../_index.html">Index (R)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../TaintedLove.html" title="TaintedLove (module)">TaintedLove</a></span></span> » <span class='title'><span class='object_link'><a href="../Replacer.html" title="TaintedLove::Replacer (module)">Replacer</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">ReplaceObject</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: TaintedLove::Replacer::ReplaceObject
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></li>
|
78
|
+
|
79
|
+
<li class="next">TaintedLove::Replacer::ReplaceObject</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/tainted_love/replacer/replace_object.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
<h2>
|
113
|
+
Instance Method Summary
|
114
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
115
|
+
</h2>
|
116
|
+
|
117
|
+
<ul class="summary">
|
118
|
+
|
119
|
+
<li class="public ">
|
120
|
+
<span class="summary_signature">
|
121
|
+
|
122
|
+
<a href="#replace!-instance_method" title="#replace! (instance method)">#<strong>replace!</strong> ⇒ Object </a>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
</span>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
137
|
+
|
138
|
+
</li>
|
139
|
+
|
140
|
+
|
141
|
+
</ul>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></h3>
|
154
|
+
<p class="inherited"><span class='object_link'><a href="Base.html#replacers-class_method" title="TaintedLove::Replacer::Base.replacers (method)">replacers</a></span>, <span class='object_link'><a href="Base.html#should_replace%3F-instance_method" title="TaintedLove::Replacer::Base#should_replace? (method)">#should_replace?</a></span></p>
|
155
|
+
|
156
|
+
|
157
|
+
<div id="instance_method_details" class="method_details_list">
|
158
|
+
<h2>Instance Method Details</h2>
|
159
|
+
|
160
|
+
|
161
|
+
<div class="method_details first">
|
162
|
+
<h3 class="signature first" id="replace!-instance_method">
|
163
|
+
|
164
|
+
#<strong>replace!</strong> ⇒ <tt>Object</tt>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
</h3><table class="source_code">
|
171
|
+
<tr>
|
172
|
+
<td>
|
173
|
+
<pre class="lines">
|
174
|
+
|
175
|
+
|
176
|
+
6
|
177
|
+
7
|
178
|
+
8
|
179
|
+
9
|
180
|
+
10
|
181
|
+
11
|
182
|
+
12
|
183
|
+
13
|
184
|
+
14
|
185
|
+
15
|
186
|
+
16
|
187
|
+
17
|
188
|
+
18
|
189
|
+
19
|
190
|
+
20
|
191
|
+
21
|
192
|
+
22</pre>
|
193
|
+
</td>
|
194
|
+
<td>
|
195
|
+
<pre class="code"><span class="info file"># File 'lib/tainted_love/replacer/replace_object.rb', line 6</span>
|
196
|
+
|
197
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_replace!'>replace!</span>
|
198
|
+
<span class='id identifier rubyid_mod'>mod</span> <span class='op'>=</span> <span class='const'>Module</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span>
|
199
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
200
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_tainted?'>tainted?</span> <span class='op'>&&</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_tainted?'>tainted?</span>
|
201
|
+
<span class='const'><span class='object_link'><a href="../../TaintedLove.html" title="TaintedLove (module)">TaintedLove</a></span></span><span class='period'>.</span><span class='id identifier rubyid_report'><span class='object_link'><a href="../../TaintedLove.html#report-class_method" title="TaintedLove.report (method)">report</a></span></span><span class='lparen'>(</span><span class='symbol'>:ReplaceObject</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='rparen'>)</span>
|
202
|
+
<span class='kw'>end</span>
|
203
|
+
|
204
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
205
|
+
<span class='kw'>end</span>
|
206
|
+
|
207
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_tainted_love_tracking'>tainted_love_tracking</span>
|
208
|
+
<span class='ivar'>@tainted_love_tracking</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
209
|
+
<span class='kw'>end</span>
|
210
|
+
<span class='kw'>end</span>
|
211
|
+
|
212
|
+
<span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_prepend'>prepend</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
|
213
|
+
<span class='kw'>end</span></pre>
|
214
|
+
</td>
|
215
|
+
</tr>
|
216
|
+
</table>
|
217
|
+
</div>
|
218
|
+
|
219
|
+
</div>
|
220
|
+
|
221
|
+
</div>
|
222
|
+
|
223
|
+
<div id="footer">
|
224
|
+
Generated on Tue Apr 2 15:50:34 2019 by
|
225
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
226
|
+
0.9.18 (ruby-2.5.3).
|
227
|
+
</div>
|
228
|
+
|
229
|
+
</div>
|
230
|
+
</body>
|
231
|
+
</html>
|