rufo 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rufo/formatter.rb +8 -0
- data/lib/rufo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0aa53149a53b3f3ff74b0faac96f745fb8de3bc
|
4
|
+
data.tar.gz: df17be90c64c3bab54fd6fec7cc4cfa50e29308d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01d29475450119316f571f6812d3137a8cd32d1e4dfc3b9ce66fdc808de906c65a6667fd997d6485c6ba067bf192dd5be527589a8c7b12751e0896b999b1da6c
|
7
|
+
data.tar.gz: 8d23542daf66eb90d1f2e0b6b05d150654a9e6c636c3993aa9c48bac995c91e7bdff1f2542d2dc98b15ce4c22f32d0814d12fee80156a06889cb0b17432f57bb
|
data/lib/rufo/formatter.rb
CHANGED
@@ -150,6 +150,8 @@ class Rufo::Formatter
|
|
150
150
|
when :string_embexpr
|
151
151
|
# String interpolation piece ( #{exp} )
|
152
152
|
visit_string_interpolation node
|
153
|
+
when :string_dvar
|
154
|
+
visit_string_dvar(node)
|
153
155
|
when :symbol_literal
|
154
156
|
visit_symbol_literal(node)
|
155
157
|
when :symbol
|
@@ -483,6 +485,12 @@ class Rufo::Formatter
|
|
483
485
|
consume_token :on_embexpr_end
|
484
486
|
end
|
485
487
|
|
488
|
+
def visit_string_dvar(node)
|
489
|
+
# [:string_dvar, [:var_ref, [:@ivar, "@foo", [1, 2]]]]
|
490
|
+
consume_token :on_embvar
|
491
|
+
visit node[1]
|
492
|
+
end
|
493
|
+
|
486
494
|
def visit_symbol_literal(node)
|
487
495
|
# :foo
|
488
496
|
#
|
data/lib/rufo/version.rb
CHANGED