o:$YARD::CodeObjects::MethodObject: @scope: class:@signature"6def extract_all_files(zip_file_path, needed_exts): @source"Ldef extract_all_files(zip_file_path, needed_exts) return unless zip_file_path =~ /\.zip$/i file_fullname = File.basename(zip_file_path) filename = file_fullname.sub(/.zip$/, "") unzip_path = File.join(Rails.root, 'tmp', 'zip_processor_tmp_dir', "#{filename}#{rand(10000000)}") unzip_result = system("unzip #{zip_file_path} -d #{unzip_path} > /dev/null") unzip_result = unzip_result && $?.exitstatus == 0 return unless unzip_result file_ext_param_str = needed_exts.map {|ext| "-iname '*.#{ext}'" }.join(" -o ") result_list_string = `find #{unzip_path} #{file_ext_param_str}` result_list = result_list_string.split("\n") if block_given? result_list.each do |file_path| yield file_path end # remove the unzip tmp files. system("rm -rf #{unzip_path}") else [result_list, unzip_path] end end: @tags[:@explicitT:@namespaceu:YARD::StubProxyMailEngine::ZipProcessor: @dynamicT:@docstring_extra0:@visibility: public: @files[["%lib/mail_engine/zip_processor.rbi: @name:extract_all_files:@source_type: ruby:@docstringIC:YARD::Docstring"Usage: MailEngine::ZipProcessor.extract_all_files(path, ["css", "jpg", "gif"]) do |file_path| Image.create :file => File.open(file_path) end Params: zip_file_path => /path/to/your/zip_file needed_exts => ['jpg', 'jpeg', 'css'] Result: [ [ "/Volumes/documents/projects/work/mail_engine/test/dummy/tmp/zip_processor_tmp_dir/compress_by_dir9671920/compress_by_file/css/example.css", "/Volumes/documents/projects/work/mail_engine/test/dummy/tmp/zip_processor_tmp_dir/compress_by_dir9671920/compress_by_file/images/logo.png", "/Volumes/documents/projects/work/mail_engine/test/dummy/tmp/zip_processor_tmp_dir/compress_by_dir9671920/compress_by_file/index.html" ], "/Volumes/documents/projects/work/mail_engine/test/dummy/tmp/zip_processor_tmp_dir/compress_by_dir9671920" ] ; [: @summary0: @objectu; /MailEngine::ZipProcessor.extract_all_files: @all[" Usage:"[MailEngine::ZipProcessor.extract_all_files(path, ["css", "jpg", "gif"]) do |file_path|"1 Image.create :file => File.open(file_path)"end"" Params:",zip_file_path => /path/to/your/zip_file"*needed_exts => ['jpg', 'jpeg', 'css']"" Result:"[" [" "/Volumes/documents/projects/work/mail_engine/test/dummy/tmp/zip_processor_tmp_dir/compress_by_dir9671920/compress_by_file/css/example.css"," "/Volumes/documents/projects/work/mail_engine/test/dummy/tmp/zip_processor_tmp_dir/compress_by_dir9671920/compress_by_file/images/logo.png"," "/Volumes/documents/projects/work/mail_engine/test/dummy/tmp/zip_processor_tmp_dir/compress_by_dir9671920/compress_by_file/index.html"" ],"q "/Volumes/documents/projects/work/mail_engine/test/dummy/tmp/zip_processor_tmp_dir/compress_by_dir9671920""]:@line_rangeo: Range:endi: begini : exclF:@ref_tags[: @path"/MailEngine::ZipProcessor.extract_all_files:@parameters[["zip_file_path0["needed_exts0:@current_file_has_commentsT: @linei