jcompiler 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jcompiler.rb +8 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d30723038e3448af220ba59a2c47999f8204ee71
4
- data.tar.gz: 9ea5e9a9963ca48406cc006a8d8005fc1f26cd93
3
+ metadata.gz: e23e2396232b4a4a98eac4b54e80a3566eae65ee
4
+ data.tar.gz: e07a94f8f582129b570defe9aa082eafa917cf84
5
5
  SHA512:
6
- metadata.gz: 91f0f7bcb9009a3f8c3bb0fd30283edbe54e6238f68f64d578cf8be96075e8d99cd104e0d0cd2b05e5b8cb1ee6fc8e7dbf928d242d2e66f7ab70a435d1997be3
7
- data.tar.gz: 59459931b4caca366b633bc9a6b68db713825368d8b514fb2c26de8119fec8c35fd324da73481397e755ec0c14c312d9b9f95b3df0bd64914cd6aa492c72662f
6
+ metadata.gz: 082d86ba2abde6dcedf05a6cc5774d1033e70e182db5a052fccaedfe527de08a831374631e449efa61f1511b8895336bc954f7675050e84aea1ad5607e6fe85b
7
+ data.tar.gz: 4a8f025ae4070ca29fc06ab363d4336a76aaa4777abfed5d17645a84120349f75ca58ac2f676303486edf6d31401e1fd4931acac79ce3fd9004bccb191f9f4bf
@@ -1,10 +1,16 @@
1
1
  class Jcompiler
2
- def self.a
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
- "{\"a\":#{brands.length}}"
13
+ "[#{a(brands).join(',')}]"
8
14
  end
9
15
  end
10
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jcompiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsuri Moriya