rubocop-slim 0.2.3 → 0.2.4
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/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: ab04cbc6e4180405af2c468a50832c0ba3be2db459d581ce1d84d1d9131ff0fe
|
4
|
+
data.tar.gz: efa8261463d5609a1b363216a83fb28aa57234f0eaf8fab30f68acf89f16924b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c76de6b75c20a5ce1cbf8eda415c04312ece5f108c9849fd470e2a5850ac5d9af66760f862266cf21a3b4538d71aa91dbb47e308ce6a59bceca03f4312dc2c8
|
7
|
+
data.tar.gz: 70b4253f59266644dbf3bfaf93a40f00347f105a168d3d051364509a0b68dc2377e96ac37a89a8f6fe9f12dbe6900b0982eed60b18599ff0efa8700b92da60ce
|
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
|