Guest User

Untitled

a guest
Feb 25th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. def find_zip_entry(resume_name)
  2. zip = Zip::File.open('test.zip')
  3. zip.each do |f|
  4. directory_name = f.name #returns the content of whole zip file
  5. directory_name = f.name.to_s #same result as above
  6. directory_name = zip.to_s #returns the name of zip file
  7. directory_name = zip.name #returns the name of zip file
  8. zip.find_entry("#{directory_name}/#{resume_name}") #search entry by resume name
  9. end
  10. end
Add Comment
Please, Sign In to add comment