Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. def update_information
  2. doc = Yomu.new(self.doc.url)
  3. self.num_of_pages = doc.metadata['xmpTPg:NPages']
  4. self.file_updated_at = doc.metadata['modified'] || doc.metadata['Creation-Date'] || Time.now
  5. self.file_created_at = doc.metadata['Creation-Date'] || Time.now
  6. end
  7.  
  8. *** Psych::SyntaxError Exception: (<unknown>): mapping values are not allowed in this context at line 23 column 15
  9.  
  10. begin
  11. doc = Yomu.new(self.doc.url)
  12. self.num_of_pages = doc.metadata['xmpTPg:NPages']
  13. self.file_updated_at = doc.metadata['modified'] || doc.metadata['Creation-Date'] || Time.now
  14. self.file_created_at = doc.metadata['Creation-Date'] || Time.now
  15. rescue Psych::SyntaxError, StandardError => e
  16. print e
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement