hdo-storting-importer 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -83,7 +83,7 @@ module Hdo
|
|
83
83
|
@party = party
|
84
84
|
@body = body
|
85
85
|
@general = general
|
86
|
-
@categories = categories
|
86
|
+
@categories = clean_categories(categories)
|
87
87
|
@source = source
|
88
88
|
@page = page
|
89
89
|
end
|
@@ -100,6 +100,14 @@ module Hdo
|
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
103
|
+
private
|
104
|
+
|
105
|
+
def clean_categories(categories)
|
106
|
+
categories.map(&:strip).
|
107
|
+
reject(&:empty?).
|
108
|
+
map { |e| UnicodeUtils.upcase(e) }
|
109
|
+
end
|
110
|
+
|
103
111
|
end
|
104
112
|
end
|
105
113
|
end
|