towsta 1.2.3 → 1.2.4

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.
@@ -0,0 +1,40 @@
1
+ module Towsta
2
+ module Kinds
3
+
4
+ class MultipleKind < MainKind
5
+
6
+ attr_accessor :content
7
+
8
+ def initialize content=nil
9
+ self.set content
10
+ end
11
+
12
+ def get
13
+ return @content if @content.class == Array
14
+ aux = []
15
+ @content.to_s.split(' ').each do |i|
16
+ Vertical.all.each do |v|
17
+ horizontal = v.find_by_id i
18
+ aux << horizontal if horizontal
19
+ end
20
+ end
21
+ @content = aux
22
+ @content
23
+ end
24
+
25
+ def set content
26
+ return @content = content if content.class == Array
27
+ @content = content.to_s
28
+ end
29
+
30
+ def export
31
+ return @content.to_s if @content.class != Array
32
+ aux = ''
33
+ @content.each {|c| aux << c.id}
34
+ aux
35
+ end
36
+
37
+ end
38
+
39
+ end
40
+ end
@@ -1,3 +1,3 @@
1
1
  module Towsta
2
- VERSION = "1.2.3"
2
+ VERSION = "1.2.4"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 2
8
- - 3
9
- version: 1.2.3
8
+ - 4
9
+ version: 1.2.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mortaro