wordcloud 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/wordcloud.rb +10 -6
  2. metadata +1 -1
data/lib/wordcloud.rb CHANGED
@@ -12,12 +12,14 @@ class WordCloud
12
12
  docnum = 0
13
13
  @input.each do |i|
14
14
  i.each do |j|
15
- splitinput = j[1].split(" ")
16
- splitinput.each do |w|
17
- if w.include? "\\n"
18
- w.gsub!("\\n", "<br />")
15
+ if j[1] != nil
16
+ splitinput = j[1].split(" ")
17
+ splitinput.each do |w|
18
+ if w.include? "\\n"
19
+ w.gsub!("\\n", "<br />")
20
+ end
21
+ wordCount(w)
19
22
  end
20
- wordCount(w)
21
23
  end
22
24
  end
23
25
  docnum += 1
@@ -25,7 +27,9 @@ class WordCloud
25
27
 
26
28
  @input.each do |i|
27
29
  i.each do |j|
28
- @output = @output + "<b>" + j[0] + ": " + "</b>" + genOutput(j[1], docnum) + "<br />"
30
+ if j[1] != nil
31
+ @output = @output + "<b>" + j[0] + ": " + "</b>" + genOutput(j[1], docnum) + "<br />"
32
+ end
29
33
  end
30
34
  @output = @output + "<br />"
31
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: