0

I have used gem exiftool to extract metadata on my rails project but on my browser its printing like an array. I want to print it in proper keys and values format. My code is this and its not working.

photo = Exiftool.new oldpath(myfile)
            photo1=photo.to_hash
            photo1.each_pair { |k, v| "#{k}:#{v}" }
shilpi_agrawal
  • 108
  • 1
  • 9

1 Answers1

0

Use prety print

require 'pp'

pp(photo.to_hash)
Ketan Doshi
  • 121
  • 8
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). – Novarg Jan 09 '15 at 13:20
  • @Novarg how can you say that "This does not provide an answer to the question."? It is. – Ketan Doshi Jan 09 '15 at 13:43