jcompiler 0.1.17 → 0.1.18

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 +4 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b99e2bc8c5c6eb9ea76346c572eed377e233740
4
- data.tar.gz: 8dc7af62d608b39370d3bd6dfae25ead69e7f781
3
+ metadata.gz: a5f8c7220de36091c854c23a345961ec5ac2493b
4
+ data.tar.gz: b3299ddec39b631e51c9e98754d4c2d09b9328a1
5
5
  SHA512:
6
- metadata.gz: 4243c9006478e1de4d44c43d97658f3f04cfeeb0209a75a46533e1616359ac1302a4408e1a41a6845b5ba6c07648f08fdcc09ebeab7e84db41b3cb866d17ec80
7
- data.tar.gz: 0b89003a7b37fa3f34e9f91abaeb20e3e5ef6c5897cccccd2c4c6d7e387283c22a7ed54835ff8841e31b647e3a7dcaccf60c849d914f135a86f759381bc0e4da
6
+ metadata.gz: 2c53c654a331585f7bd82170bbf30f1a70c3dd07e47c3ad83c6eec68c178c522f32167568dedac4c994f92d6b9da44df25bea8f28d9238ffbbc77ef9022533c0
7
+ data.tar.gz: 16a4f970439187748777d7246ba368abc367776d10b00ea735f168196afab2ac788fc0f4b7f55c39416306d07130738128b0d0260623df7a9a51b76cfa02bce5
@@ -1,6 +1,9 @@
1
1
  class Jcompiler
2
2
  def self.b(brand)
3
- ["\"id\":#{brand.id}", "\"name\":#{ActiveSupport::JSON.encode(brand.name)}"]
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)
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.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsuri Moriya