Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def update_information
- doc = Yomu.new(self.doc.url)
- self.num_of_pages = doc.metadata['xmpTPg:NPages']
- self.file_updated_at = doc.metadata['modified'] || doc.metadata['Creation-Date'] || Time.now
- self.file_created_at = doc.metadata['Creation-Date'] || Time.now
- end
- *** Psych::SyntaxError Exception: (<unknown>): mapping values are not allowed in this context at line 23 column 15
- begin
- doc = Yomu.new(self.doc.url)
- self.num_of_pages = doc.metadata['xmpTPg:NPages']
- self.file_updated_at = doc.metadata['modified'] || doc.metadata['Creation-Date'] || Time.now
- self.file_created_at = doc.metadata['Creation-Date'] || Time.now
- rescue Psych::SyntaxError, StandardError => e
- print e
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement