jsontochart 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/jsontochart.rb +5 -5
  2. metadata +1 -1
data/lib/jsontochart.rb CHANGED
@@ -74,11 +74,11 @@ class JSONToChart
74
74
  tmpstring = tmpstring + dhash[key].to_s
75
75
  elsif dhash[key].is_a? Array
76
76
  hold = "'"
77
- j = 0
77
+ z = 0
78
78
  dhash[key].each do |i|
79
- j++
80
- hold = hold + i
81
- if dhash.len > j
79
+ z += 1
80
+ hold = hold + i.to_s
81
+ if j < dhash[key].length
82
82
  hold = hold + ","
83
83
  end
84
84
  end
@@ -86,7 +86,7 @@ class JSONToChart
86
86
  tmpstring = tmpstring + hold
87
87
  else tmpstring = tmpstring + "'" + dhash[key].to_s + "'"
88
88
  end
89
- else tmpstring = tmpstring + "' '"
89
+ else tmpstring = tmpstring + "null"
90
90
  end
91
91
 
92
92
  # Check if it is the end of the line and append correct characters
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsontochart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: