boxnet 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/boxnet/version.rb +1 -1
- data/lib/file_node.rb +5 -9
- metadata +1 -1
data/lib/boxnet/version.rb
CHANGED
data/lib/file_node.rb
CHANGED
@@ -9,18 +9,16 @@ module Boxnet
|
|
9
9
|
|
10
10
|
if data.has_key?("folder")
|
11
11
|
puts "1" if data["folder"].nil?
|
12
|
-
self.folders <<
|
12
|
+
self.folders << Boxnet::Folder.new(data["folder"])
|
13
13
|
elsif data.has_key?("folders")
|
14
14
|
folder = data["folders"]["folder"]
|
15
15
|
|
16
16
|
if folder.class == Array
|
17
17
|
folder.each do |f|
|
18
|
-
|
19
|
-
self.folders << ::Boxnet::Folder.new(f)
|
18
|
+
self.folders << Boxnet::Folder.new(f)
|
20
19
|
end
|
21
20
|
elsif folder.class == Hash
|
22
|
-
|
23
|
-
self.folders << ::Boxnet::Folder.new(folder)
|
21
|
+
self.folders << Boxnet::Folder.new(folder)
|
24
22
|
end
|
25
23
|
end
|
26
24
|
|
@@ -29,12 +27,10 @@ module Boxnet
|
|
29
27
|
|
30
28
|
if file.class == Array
|
31
29
|
file.each do |f|
|
32
|
-
|
33
|
-
self.files << ::Boxnet::File.new(f)
|
30
|
+
self.files << Boxnet::File.new(f)
|
34
31
|
end
|
35
32
|
elsif file.class == Hash
|
36
|
-
|
37
|
-
self.files << ::Boxnet::File.new(file)
|
33
|
+
self.files << Boxnet::File.new(file)
|
38
34
|
end
|
39
35
|
end
|
40
36
|
end
|