Class: Helper::FileSeeker
- Inherits:
-
Object
- Object
- Helper::FileSeeker
- Defined in:
- lib/iosappaudit/Helper/file_seeker.rb
Instance Method Summary collapse
- #find_file_names_with_extension(url, extension) ⇒ Object
- #find_files(url, name, extension) ⇒ Object
- #find_files_with_extension(url, extension) ⇒ Object
-
#initialize ⇒ FileSeeker
constructor
A new instance of FileSeeker.
Constructor Details
#initialize ⇒ FileSeeker
Returns a new instance of FileSeeker.
4 5 |
# File 'lib/iosappaudit/Helper/file_seeker.rb', line 4 def initialize() end |
Instance Method Details
#find_file_names_with_extension(url, extension) ⇒ Object
16 17 18 |
# File 'lib/iosappaudit/Helper/file_seeker.rb', line 16 def find_file_names_with_extension(url, extension) find_files_with_extension(url, extension).map { |url| File.basename(url) } end |
#find_files(url, name, extension) ⇒ Object
8 9 10 |
# File 'lib/iosappaudit/Helper/file_seeker.rb', line 8 def find_files(url, name, extension) Dir.glob("#{url}/**/#{name}.#{extension}") end |
#find_files_with_extension(url, extension) ⇒ Object
12 13 14 |
# File 'lib/iosappaudit/Helper/file_seeker.rb', line 12 def find_files_with_extension(url, extension) Dir.glob("#{url}/**/*.#{extension}") end |