inspecstyle 0.1.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/Gemfile +1 -0
- data/Gemfile.lock +12 -7
- data/README.md +36 -1
- data/Rakefile +3 -0
- data/config/default.yml +18 -0
- data/doc/RuboCop.html +128 -0
- data/doc/RuboCop/Cop.html +117 -0
- data/doc/RuboCop/Cop/InSpecStyle.html +117 -0
- data/doc/RuboCop/Cop/InSpecStyle/AzureGenericResource.html +249 -0
- data/doc/RuboCop/Cop/InSpecStyle/DeprecatedAttributes.html +310 -0
- data/doc/RuboCop/Cop/InSpecStyle/FirstCop.html +345 -0
- data/doc/RuboCop/InSpecStyle.html +140 -0
- data/doc/RuboCop/InSpecStyle/Error.html +124 -0
- data/doc/RuboCop/InSpecStyle/Inject.html +195 -0
- data/doc/_index.html +211 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.README.html +131 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +131 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +99 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/rubocop/cop/inspecstyle/azure_generic_resource.rb +35 -0
- data/lib/rubocop/cop/inspecstyle/deprecated_attributes.rb +17 -15
- data/lib/rubocop/cop/inspecstyle/first_cop.rb +0 -1
- data/lib/rubocop/cop/inspecstyle/oracle_db_session_pass.rb +38 -0
- data/lib/rubocop/cop/inspecstyle/shadow_properties.rb +61 -0
- data/lib/rubocop/cop/inspecstyle_cops.rb +3 -0
- data/lib/rubocop/inspecstyle/version.rb +1 -1
- data/notes-for-development.md +3 -0
- data/tasks/cops_documentation.rake +300 -0
- metadata +29 -2
@@ -0,0 +1,249 @@
|
|
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: RuboCop::Cop::InSpecStyle::AzureGenericResource
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.25
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "RuboCop::Cop::InSpecStyle::AzureGenericResource";
|
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 (A)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../../RuboCop.html" title="RuboCop (module)">RuboCop</a></span></span> » <span class='title'><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">Cop</a></span></span> » <span class='title'><span class='object_link'><a href="../InSpecStyle.html" title="RuboCop::Cop::InSpecStyle (module)">InSpecStyle</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">AzureGenericResource</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: RuboCop::Cop::InSpecStyle::AzureGenericResource
|
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="../../Cop.html" title="RuboCop::Cop (module)">RuboCop::Cop</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">RuboCop::Cop</a></span></li>
|
78
|
+
|
79
|
+
<li class="next">RuboCop::Cop::InSpecStyle::AzureGenericResource</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/rubocop/cop/inspecstyle/azure_generic_resource.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
|
107
|
+
<p>Do not use azure_generic_resource</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
<div class="examples">
|
115
|
+
<p class="tag_title">Examples:</p>
|
116
|
+
|
117
|
+
|
118
|
+
<p class="example_title"><div class='inline'>
|
119
|
+
<p>EnforcedStyle: InSpecStyle (default)</p>
|
120
|
+
</div></p>
|
121
|
+
|
122
|
+
<pre class="example code"><code><span class='comment'># azure_generic_resource has been deprecated
|
123
|
+
</span><span class='comment'># 'https://github.com/inspec/inspec/issues/3131'
|
124
|
+
</span>
|
125
|
+
<span class='comment'># bad
|
126
|
+
</span><span class='id identifier rubyid_azure_generic_resource'>azure_generic_resource</span>
|
127
|
+
|
128
|
+
<span class='comment'># good
|
129
|
+
</span><span class='id identifier rubyid_azurerm_virtual_machine'>azurerm_virtual_machine</span> <span class='comment'># use a specific resource pack resource</span></code></pre>
|
130
|
+
|
131
|
+
</div>
|
132
|
+
|
133
|
+
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<h2>
|
137
|
+
Constant Summary
|
138
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
139
|
+
</h2>
|
140
|
+
|
141
|
+
<dl class="constants">
|
142
|
+
|
143
|
+
<dt id="MSG-constant" class="">MSG =
|
144
|
+
|
145
|
+
</dt>
|
146
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Use a specific resource instead of `#azure_generic_resource`. </span><span class='tstring_end'>'</span></span>\
|
147
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>This resource will be removed in InSpec 5.</span><span class='tstring_end'>'</span></span></pre></dd>
|
148
|
+
|
149
|
+
</dl>
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
<h2>
|
160
|
+
Instance Method Summary
|
161
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
162
|
+
</h2>
|
163
|
+
|
164
|
+
<ul class="summary">
|
165
|
+
|
166
|
+
<li class="public ">
|
167
|
+
<span class="summary_signature">
|
168
|
+
|
169
|
+
<a href="#on_send-instance_method" title="#on_send (instance method)">#<strong>on_send</strong>(node) ⇒ Object </a>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
</span>
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
184
|
+
|
185
|
+
</li>
|
186
|
+
|
187
|
+
|
188
|
+
</ul>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
<div id="instance_method_details" class="method_details_list">
|
200
|
+
<h2>Instance Method Details</h2>
|
201
|
+
|
202
|
+
|
203
|
+
<div class="method_details first">
|
204
|
+
<h3 class="signature first" id="on_send-instance_method">
|
205
|
+
|
206
|
+
#<strong>on_send</strong>(node) ⇒ <tt>Object</tt>
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
</h3><table class="source_code">
|
213
|
+
<tr>
|
214
|
+
<td>
|
215
|
+
<pre class="lines">
|
216
|
+
|
217
|
+
|
218
|
+
26
|
219
|
+
27
|
220
|
+
28
|
221
|
+
29
|
222
|
+
30</pre>
|
223
|
+
</td>
|
224
|
+
<td>
|
225
|
+
<pre class="code"><span class="info file"># File 'lib/rubocop/cop/inspecstyle/azure_generic_resource.rb', line 26</span>
|
226
|
+
|
227
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_on_send'>on_send</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
228
|
+
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_azure_generic_resource?'>azure_generic_resource?</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
229
|
+
|
230
|
+
<span class='id identifier rubyid_add_offense'>add_offense</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='comma'>,</span> <span class='label'>location:</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_loc'>loc</span><span class='period'>.</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
231
|
+
<span class='kw'>end</span></pre>
|
232
|
+
</td>
|
233
|
+
</tr>
|
234
|
+
</table>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
</div>
|
238
|
+
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<div id="footer">
|
242
|
+
Generated on Thu Jun 11 11:57:48 2020 by
|
243
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
244
|
+
0.9.25 (ruby-2.6.6).
|
245
|
+
</div>
|
246
|
+
|
247
|
+
</div>
|
248
|
+
</body>
|
249
|
+
</html>
|
@@ -0,0 +1,310 @@
|
|
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: RuboCop::Cop::InSpecStyle::DeprecatedAttributes
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.25
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "RuboCop::Cop::InSpecStyle::DeprecatedAttributes";
|
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 (D)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../../RuboCop.html" title="RuboCop (module)">RuboCop</a></span></span> » <span class='title'><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">Cop</a></span></span> » <span class='title'><span class='object_link'><a href="../InSpecStyle.html" title="RuboCop::Cop::InSpecStyle (module)">InSpecStyle</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">DeprecatedAttributes</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: RuboCop::Cop::InSpecStyle::DeprecatedAttributes
|
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="../../Cop.html" title="RuboCop::Cop (module)">RuboCop::Cop</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">RuboCop::Cop</a></span></li>
|
78
|
+
|
79
|
+
<li class="next">RuboCop::Cop::InSpecStyle::DeprecatedAttributes</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
<dl>
|
93
|
+
<dt>Includes:</dt>
|
94
|
+
<dd>RangeHelp</dd>
|
95
|
+
</dl>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<dl>
|
103
|
+
<dt>Defined in:</dt>
|
104
|
+
<dd>lib/rubocop/cop/inspecstyle/deprecated_attributes.rb</dd>
|
105
|
+
</dl>
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<h2>Overview</h2><div class="docstring">
|
110
|
+
<div class="discussion">
|
111
|
+
|
112
|
+
<p>Checks if deprecated method attribute is used.</p>
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
<div class="tags">
|
118
|
+
|
119
|
+
<div class="examples">
|
120
|
+
<p class="tag_title">Examples:</p>
|
121
|
+
|
122
|
+
|
123
|
+
<p class="example_title"><div class='inline'>
|
124
|
+
<p>EnforcedStyle: InSpecStyle (default)</p>
|
125
|
+
</div></p>
|
126
|
+
|
127
|
+
<pre class="example code"><code><span class='comment'># Attributes have been deprecated for inputs
|
128
|
+
</span><span class='comment'># https://github.com/inspec/inspec/issues/3802
|
129
|
+
</span>
|
130
|
+
<span class='comment'># bad
|
131
|
+
</span><span class='id identifier rubyid_attribute'>attribute</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>my_element</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>value:</span> <span class='int'>10</span><span class='rparen'>)</span>
|
132
|
+
|
133
|
+
<span class='comment'># good
|
134
|
+
</span><span class='id identifier rubyid_input'>input</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>my_element</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>value:</span> <span class='int'>10</span><span class='rparen'>)</span></code></pre>
|
135
|
+
|
136
|
+
</div>
|
137
|
+
|
138
|
+
|
139
|
+
</div>
|
140
|
+
|
141
|
+
<h2>
|
142
|
+
Constant Summary
|
143
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
144
|
+
</h2>
|
145
|
+
|
146
|
+
<dl class="constants">
|
147
|
+
|
148
|
+
<dt id="MSG-constant" class="">MSG =
|
149
|
+
|
150
|
+
</dt>
|
151
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Use `#input` instead of `#attribute`.</span><span class='tstring_end'>'</span></span></pre></dd>
|
152
|
+
|
153
|
+
</dl>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
<h2>
|
164
|
+
Instance Method Summary
|
165
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
166
|
+
</h2>
|
167
|
+
|
168
|
+
<ul class="summary">
|
169
|
+
|
170
|
+
<li class="public ">
|
171
|
+
<span class="summary_signature">
|
172
|
+
|
173
|
+
<a href="#autocorrect-instance_method" title="#autocorrect (instance method)">#<strong>autocorrect</strong>(node) ⇒ Object </a>
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
</span>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
188
|
+
|
189
|
+
</li>
|
190
|
+
|
191
|
+
|
192
|
+
<li class="public ">
|
193
|
+
<span class="summary_signature">
|
194
|
+
|
195
|
+
<a href="#on_send-instance_method" title="#on_send (instance method)">#<strong>on_send</strong>(node) ⇒ Object </a>
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
</span>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
210
|
+
|
211
|
+
</li>
|
212
|
+
|
213
|
+
|
214
|
+
</ul>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
<div id="instance_method_details" class="method_details_list">
|
227
|
+
<h2>Instance Method Details</h2>
|
228
|
+
|
229
|
+
|
230
|
+
<div class="method_details first">
|
231
|
+
<h3 class="signature first" id="autocorrect-instance_method">
|
232
|
+
|
233
|
+
#<strong>autocorrect</strong>(node) ⇒ <tt>Object</tt>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
</h3><table class="source_code">
|
240
|
+
<tr>
|
241
|
+
<td>
|
242
|
+
<pre class="lines">
|
243
|
+
|
244
|
+
|
245
|
+
34
|
246
|
+
35
|
247
|
+
36
|
248
|
+
37
|
249
|
+
38</pre>
|
250
|
+
</td>
|
251
|
+
<td>
|
252
|
+
<pre class="code"><span class="info file"># File 'lib/rubocop/cop/inspecstyle/deprecated_attributes.rb', line 34</span>
|
253
|
+
|
254
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_autocorrect'>autocorrect</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
255
|
+
<span class='id identifier rubyid_lambda'>lambda</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_corrector'>corrector</span><span class='op'>|</span>
|
256
|
+
<span class='id identifier rubyid_corrector'>corrector</span><span class='period'>.</span><span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_offense_range'>offense_range</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_preferred_replacement'>preferred_replacement</span><span class='rparen'>)</span>
|
257
|
+
<span class='kw'>end</span>
|
258
|
+
<span class='kw'>end</span></pre>
|
259
|
+
</td>
|
260
|
+
</tr>
|
261
|
+
</table>
|
262
|
+
</div>
|
263
|
+
|
264
|
+
<div class="method_details ">
|
265
|
+
<h3 class="signature " id="on_send-instance_method">
|
266
|
+
|
267
|
+
#<strong>on_send</strong>(node) ⇒ <tt>Object</tt>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
</h3><table class="source_code">
|
274
|
+
<tr>
|
275
|
+
<td>
|
276
|
+
<pre class="lines">
|
277
|
+
|
278
|
+
|
279
|
+
28
|
280
|
+
29
|
281
|
+
30
|
282
|
+
31
|
283
|
+
32</pre>
|
284
|
+
</td>
|
285
|
+
<td>
|
286
|
+
<pre class="code"><span class="info file"># File 'lib/rubocop/cop/inspecstyle/deprecated_attributes.rb', line 28</span>
|
287
|
+
|
288
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_on_send'>on_send</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
289
|
+
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_attribute?'>attribute?</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
|
290
|
+
|
291
|
+
<span class='id identifier rubyid_add_offense'>add_offense</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='comma'>,</span> <span class='label'>location:</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_loc'>loc</span><span class='period'>.</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
292
|
+
<span class='kw'>end</span></pre>
|
293
|
+
</td>
|
294
|
+
</tr>
|
295
|
+
</table>
|
296
|
+
</div>
|
297
|
+
|
298
|
+
</div>
|
299
|
+
|
300
|
+
</div>
|
301
|
+
|
302
|
+
<div id="footer">
|
303
|
+
Generated on Thu Jun 11 11:57:48 2020 by
|
304
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
305
|
+
0.9.25 (ruby-2.6.6).
|
306
|
+
</div>
|
307
|
+
|
308
|
+
</div>
|
309
|
+
</body>
|
310
|
+
</html>
|