jcompiler 0.1.15 → 0.1.16
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 +8 -2
- 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: e23e2396232b4a4a98eac4b54e80a3566eae65ee
|
4
|
+
data.tar.gz: e07a94f8f582129b570defe9aa082eafa917cf84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 082d86ba2abde6dcedf05a6cc5774d1033e70e182db5a052fccaedfe527de08a831374631e449efa61f1511b8895336bc954f7675050e84aea1ad5607e6fe85b
|
7
|
+
data.tar.gz: 4a8f025ae4070ca29fc06ab363d4336a76aaa4777abfed5d17645a84120349f75ca58ac2f676303486edf6d31401e1fd4931acac79ce3fd9004bccb191f9f4bf
|
data/lib/jcompiler.rb
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
class Jcompiler
|
2
|
-
def self.
|
2
|
+
def self.b(brand)
|
3
|
+
["\"id\":#{brand.id}", "\"name\":\"#{brand.name}\""]
|
4
|
+
end
|
3
5
|
|
6
|
+
def self.a(brands)
|
7
|
+
brands.map do |brand|
|
8
|
+
"{#{b(brand).join(',')}}"
|
9
|
+
end
|
4
10
|
end
|
5
11
|
|
6
12
|
def self.code(brands)
|
7
|
-
"{
|
13
|
+
"[#{a(brands).join(',')}]"
|
8
14
|
end
|
9
15
|
end
|
10
16
|
|