jcompiler 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jcompiler.rb +4 -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: a5f8c7220de36091c854c23a345961ec5ac2493b
|
4
|
+
data.tar.gz: b3299ddec39b631e51c9e98754d4c2d09b9328a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c53c654a331585f7bd82170bbf30f1a70c3dd07e47c3ad83c6eec68c178c522f32167568dedac4c994f92d6b9da44df25bea8f28d9238ffbbc77ef9022533c0
|
7
|
+
data.tar.gz: 16a4f970439187748777d7246ba368abc367776d10b00ea735f168196afab2ac788fc0f4b7f55c39416306d07130738128b0d0260623df7a9a51b76cfa02bce5
|
data/lib/jcompiler.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
class Jcompiler
|
2
2
|
def self.b(brand)
|
3
|
-
|
3
|
+
%i(id, name, description).map do |sym|
|
4
|
+
v = brand.send(sym)
|
5
|
+
"\"#{sym}\":#{v.is_a?(String) ? ActiveSupport::JSON.encode(v) : v ? v.to_s : 'null'}"
|
6
|
+
end
|
4
7
|
end
|
5
8
|
|
6
9
|
def self.a(brands)
|