lib/ronin/static/finders.rb in ronin-0.2.2 vs lib/ronin/static/finders.rb in ronin-0.2.3

- old
+ new

@@ -100,10 +100,18 @@ return paths end # + # Passes all matching static paths for the specified _path_ to the + # given _block_. + # + def each_static_path(path,&block) + static_find_all(path).each(&block) + end + + # # Returns all matching static files for the specified _path_. # def find_static_files(path) paths = [] @@ -113,19 +121,35 @@ return paths end # + # Passes each matching static file for the specified _path_ to the + # given _block_. + # + def each_static_file(path,&block) + find_static_files(path).each(&block) + end + + # # Returns all matching static directories for the specified _path_. # def find_static_dirs(path) paths = [] static_paths(path) do |full_path| paths << full_path if File.directory?(full_path) end return paths + end + + # + # Passes each matching static directory for the specified _path_ to + # the given _block_. + # + def each_static_dir(path,&block) + find_static_dirs(path).each(&block) end # # Returns all matching static paths for the specified _pattern_. #