daily pastebin goal
54%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top