10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'app/lib.rb', line 10
def run(argv)
no_dir_file_length = Library::SUBDIR_LENGTH + Library::EXT.length
Library.directories.each do |dir|
next unless dir.directory?
dir.each_child do |child|
if child.to_path.length < no_dir_file_length && child.extname != Library::EXT
show_info child
next
end
next unless child.directory?
next unless child.basename.to_path.length == Library::SUBDIR_LENGTH
child.each_child do |lib|
next unless lib.extname == Library::EXT
next unless lib.file?
show_info lib
end
end
end
end
|