rubocop-slim 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rubocop/slim/keyword_remover.rb +1 -0
- data/lib/rubocop/slim/version.rb +1 -1
- data/lib/rubocop/slim/when_decomposer.rb +8 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acd8c1d290c8711b0b4877edb6ec304359d7ad7c6fcfdc191001441d0a3125f6
|
4
|
+
data.tar.gz: 748d147c34bc080f1f2b944dfe61421d62395a0585103a1b665e75f05dcc5fa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2fa7a6c42f0a089c8f2917c0dff4fc9087d7daebd855b277faeb59c345cdbb32f5805c74247f5d40065a88859757b57dbd0c3f5eb77747597ff19743aa2ba1a
|
7
|
+
data.tar.gz: add4a21478c6e0340436bfa84264f3e1b645a4da1ba1e0db5d60a7064340e34c328ec3d6e9d46ed0dd8e2f65d1c89c7949bbb3fba50e2374f06f1c17361e0899
|
data/Gemfile.lock
CHANGED
data/lib/rubocop/slim/version.rb
CHANGED
@@ -31,10 +31,16 @@ module RuboCop
|
|
31
31
|
if match_data
|
32
32
|
offset = match_data[0].length
|
33
33
|
condition = @ruby_clip.code[offset..].sub(/[ \t]then(?:[ \t].*)?/, '')
|
34
|
-
parse(
|
34
|
+
parse(
|
35
|
+
<<~RUBY
|
36
|
+
[
|
37
|
+
#{condition}
|
38
|
+
]
|
39
|
+
RUBY
|
40
|
+
).children.map do |child|
|
35
41
|
RubyClip.new(
|
36
42
|
code: child.location.expression.source,
|
37
|
-
offset: @ruby_clip.offset + offset + child.location.expression.begin_pos -
|
43
|
+
offset: @ruby_clip.offset + offset + child.location.expression.begin_pos - 4
|
38
44
|
)
|
39
45
|
end
|
40
46
|
else
|