mack_ruby_core_extensions 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/classes/Array.html +74 -74
- data/doc/classes/Class.html +40 -27
- data/doc/classes/Float.html +6 -6
- data/doc/classes/Hash.html +18 -18
- data/doc/classes/Kernel.html +12 -12
- data/doc/classes/Mack/Utils/Inflector.html +56 -56
- data/doc/classes/Math.html +18 -18
- data/doc/classes/MethodNotImplemented.html +6 -6
- data/doc/classes/Module.html +12 -12
- data/doc/classes/NilClass.html +6 -6
- data/doc/classes/Object.html +42 -42
- data/doc/classes/String.html +402 -375
- data/doc/created.rid +1 -1
- data/doc/files/lib/extensions/class_rb.html +1 -1
- data/doc/files/lib/extensions/string_rb.html +1 -1
- data/doc/fr_class_index.html +0 -1
- data/doc/fr_file_index.html +0 -1
- data/doc/fr_method_index.html +65 -66
- data/lib/extensions/class.rb +8 -3
- data/lib/extensions/string.rb +5 -0
- data/test/extensions/class_test.rb +7 -15
- data/test/extensions/string_test.rb +5 -4
- data/test/test_helper.rb +15 -1
- metadata +1 -5
- data/doc/classes/Dir.html +0 -190
- data/doc/files/lib/extensions/dir_rb.html +0 -101
- data/lib/extensions/dir.rb +0 -25
- data/test/extensions/dir_test.rb +0 -15
data/lib/extensions/dir.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
class Dir
|
2
|
-
|
3
|
-
|
4
|
-
#creates multiple directories
|
5
|
-
def self.make_dirs(path)
|
6
|
-
dir_names = path.split('/')
|
7
|
-
new_path=""
|
8
|
-
dir_names.each do |x|
|
9
|
-
new_path = new_path << x << '/'
|
10
|
-
if !File.directory?(new_path)
|
11
|
-
Dir.mkdir(new_path)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
|
17
|
-
#if a directory exists, it deletes everything in it, otherwise it creates the directory
|
18
|
-
def self.prep_dir(path)
|
19
|
-
if File.directory?(path)
|
20
|
-
Dir.foreach(path) {|x| File.delete(path + x) unless File.directory?(path + x)}
|
21
|
-
else
|
22
|
-
Dir.make_dirs(path)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
data/test/extensions/dir_test.rb
DELETED