jcompiler 0.1.38 → 0.1.39

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 +6 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2f378f1a61502e55083f6d07f7b13a062b2d8b9
4
- data.tar.gz: 99dc1f0d7f7552c18e59089aab237926063c6a10
3
+ metadata.gz: 32b6cede5b722b3990c0ecd47631b8d04a732d21
4
+ data.tar.gz: 4606729e5b28c75244ad288662b52b17e22f2517
5
5
  SHA512:
6
- metadata.gz: b23124dac941376e5bcf29da4f0a8ed41e31a1a78493aab9eb8ccf22d28d58145e848f0d4a16d663b82d78d165b8637e2fc0e763a71dc903a26249bf3767583c
7
- data.tar.gz: 5f58536883b5a80d48e7db7a6cd5fd49030eae14755d2008dea6efbaf55005c27202dcaab7ab2ecadb5345a06363303670c66ad10482970d48fdcdb6f46e028e
6
+ metadata.gz: 121c67a3ab3a04bc5d2e3d8d955be29ffc4a50f07e25b1d05c05ae9bc2cf0696960fce4ddb4bafffc7cc66fa3f15c55b3184484d887a1a295015e2bdc20c9e75
7
+ data.tar.gz: 6d345921282de0e8d915404317188c085f6b464da9a79a8c2e551aba053248ba806c8ae5dabed9155c8fad1059ffa5bceda6f8ba369394675ccfc8d820b8c507
@@ -1,5 +1,5 @@
1
1
  class Jcompiler
2
- def self.b(brand, bind)
2
+ def b(brand, bind)
3
3
  bind.local_variable_set(:brand, brand)
4
4
  {
5
5
  id: 'brand.id',
@@ -18,13 +18,13 @@ class Jcompiler
18
18
  end
19
19
  end
20
20
 
21
- def self.a(brands, bind)
21
+ def a(brands, bind)
22
22
  brands.map do |brand|
23
23
  "{#{b(brand, bind).join(',')}}"
24
24
  end
25
25
  end
26
26
 
27
- def self.code(brands, bind)
27
+ def code(brands, bind)
28
28
  bind.local_variable_set(:brands, brands)
29
29
  "[#{a(brands, bind).join(',')}]"
30
30
  end
@@ -34,8 +34,10 @@ class JcompilerHandler
34
34
  cattr_accessor :default_format
35
35
  self.default_format = Mime::JSON
36
36
 
37
+ @@jcompiler = Jcompiler.new
38
+
37
39
  def self.call(template)
38
- "Jcompiler.code(@brands, binding)"
40
+ "@@jcompiler.code(@brands, binding)"
39
41
  end
40
42
  end
41
43
 
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.38
4
+ version: 0.1.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsuri Moriya