jcompiler 0.1.19 → 0.1.20
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 +3 -3
- 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: bc738f59cfae7cd6a2b0018b8dea05931988195c
|
4
|
+
data.tar.gz: 4ed682253103af4bf4b502323f8358bed62e1487
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67b87f48adb01c7044625bbf6d62493392b2eba027b8a0492aa6a6dc804d5e9c53fe2b3f0bd26f5fe3aaa7da7f61f3f956cf49eb4c9a94bc9fc28631ddf7ec38
|
7
|
+
data.tar.gz: 66d4da337a5c55472ee25452615ed9b2fe59f2ccc937cbf0228af71ba8ca93353201847705b3e4892847816ba40cd486319602238beb8a471da3c57e7f404ef9
|
data/lib/jcompiler.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
class Jcompiler
|
2
2
|
def self.b(brand)
|
3
|
-
%
|
4
|
-
v = eval("brand.#{
|
5
|
-
"\"#{
|
3
|
+
%w(id name description).map do |attr|
|
4
|
+
v = eval("brand.#{attr}")
|
5
|
+
"\"#{attr}\":#{v.is_a?(String) ? ActiveSupport::JSON.encode(v) : v ? v.to_s : 'null'}"
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|