@@ -101,8 +101,9 @@ The maximum allowed length is configurable.
101
101
The cop can be configured to ignore blocks passed to certain methods.
102
102
103
103
You can set constructs you want to fold with `CountAsOne`.
104
- Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct
105
- will be counted as one line regardless of its actual size.
104
+
105
+ Available are: 'array', 'hash', 'heredoc', and 'method_call'.
106
+ Each construct will be counted as one line regardless of its actual size.
106
107
107
108
NOTE: This cop does not apply for `Struct` definitions.
108
109
@@ -112,7 +113,7 @@ instead. By default, there are no methods to allowed.
112
113
113
114
=== Examples
114
115
115
- ==== CountAsOne: ['array', 'heredoc', 'method_call']
116
+ ==== CountAsOne: ['array', 'hash', ' heredoc', 'method_call']
116
117
117
118
[source,ruby]
118
119
----
@@ -122,7 +123,7 @@ something do
122
123
2
123
124
]
124
125
125
- hash = { # +3
126
+ hash = { # +1
126
127
key: 'value'
127
128
}
128
129
@@ -135,7 +136,7 @@ something do
135
136
1,
136
137
2
137
138
)
138
- end # 6 points
139
+ end # 4 points
139
140
----
140
141
141
142
=== Configurable attributes
@@ -228,14 +229,15 @@ Comment lines can optionally be ignored.
228
229
The maximum allowed length is configurable.
229
230
230
231
You can set constructs you want to fold with `CountAsOne`.
231
- Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct
232
- will be counted as one line regardless of its actual size.
232
+
233
+ Available are: 'array', 'hash', 'heredoc', and 'method_call'.
234
+ Each construct will be counted as one line regardless of its actual size.
233
235
234
236
NOTE: This cop also applies for `Struct` definitions.
235
237
236
238
=== Examples
237
239
238
- ==== CountAsOne: ['array', 'heredoc', 'method_call']
240
+ ==== CountAsOne: ['array', 'hash', ' heredoc', 'method_call']
239
241
240
242
[source,ruby]
241
243
----
@@ -245,7 +247,7 @@ class Foo
245
247
2
246
248
]
247
249
248
- HASH = { # +3
250
+ HASH = { # +1
249
251
key: 'value'
250
252
}
251
253
@@ -258,7 +260,7 @@ class Foo
258
260
1,
259
261
2
260
262
)
261
- end # 6 points
263
+ end # 4 points
262
264
----
263
265
264
266
=== Configurable attributes
@@ -423,8 +425,9 @@ Comment lines can optionally be allowed.
423
425
The maximum allowed length is configurable.
424
426
425
427
You can set constructs you want to fold with `CountAsOne`.
426
- Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct
427
- will be counted as one line regardless of its actual size.
428
+
429
+ Available are: 'array', 'hash', 'heredoc', and 'method_call'.
430
+ Each construct will be counted as one line regardless of its actual size.
428
431
429
432
NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is
430
433
deprecated and only kept for backwards compatibility.
@@ -433,7 +436,7 @@ By default, there are no methods to allowed.
433
436
434
437
=== Examples
435
438
436
- ==== CountAsOne: ['array', 'heredoc', 'method_call']
439
+ ==== CountAsOne: ['array', 'hash', ' heredoc', 'method_call']
437
440
438
441
[source,ruby]
439
442
----
@@ -443,7 +446,7 @@ def m
443
446
2
444
447
]
445
448
446
- hash = { # +3
449
+ hash = { # +1
447
450
key: 'value'
448
451
}
449
452
@@ -456,7 +459,7 @@ def m
456
459
1,
457
460
2
458
461
)
459
- end # 6 points
462
+ end # 4 points
460
463
----
461
464
462
465
=== Configurable attributes
@@ -506,12 +509,13 @@ Comment lines can optionally be ignored.
506
509
The maximum allowed length is configurable.
507
510
508
511
You can set constructs you want to fold with `CountAsOne`.
509
- Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct
510
- will be counted as one line regardless of its actual size.
512
+
513
+ Available are: 'array', 'hash', 'heredoc', and 'method_call'.
514
+ Each construct will be counted as one line regardless of its actual size.
511
515
512
516
=== Examples
513
517
514
- ==== CountAsOne: ['array', 'heredoc', 'method_call']
518
+ ==== CountAsOne: ['array', 'hash', ' heredoc', 'method_call']
515
519
516
520
[source,ruby]
517
521
----
@@ -521,7 +525,7 @@ module M
521
525
2
522
526
]
523
527
524
- HASH = { # +3
528
+ HASH = { # +1
525
529
key: 'value'
526
530
}
527
531
@@ -534,7 +538,7 @@ module M
534
538
1,
535
539
2
536
540
)
537
- end # 6 points
541
+ end # 4 points
538
542
----
539
543
540
544
=== Configurable attributes
0 commit comments