Guest User

Untitled

a guest
Jun 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. # Inside the AfterTheDeadline class
  2. def check(data)
  3. result = self.class.post('/checkDocumet', :query => {:data => data})
  4. @result result['results']
  5. end
  6.  
  7. def url
  8. error = @result['error']
  9. url = error['url']
  10. end
  11.  
  12. # Doing this grabs the results fine
  13. data = "I'm really hating this wether!"
  14. atd = AfterTheDeadline.new
  15. result = atd.check(data)
  16.  
  17. p result.url
  18.  
  19. # But the last line throws this at me
  20. after_the_deadline.rb:33: undefined method `url' for #<Hash:0xb787cce4> (NoMethodError)
Add Comment
Please, Sign In to add comment