Guest User

Untitled

a guest
Oct 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. class ToolParser
  2. def to_json
  3. self.to_json
  4. end
  5.  
  6. def to_hash # or attributes
  7. self.to_hash
  8. end
  9.  
  10. def execute(xml)
  11. raise NotImplementedError # do the hard work here
  12. end
  13. end
  14.  
  15. class NessusParser < ToolParser
  16. def execute(xml)
  17. # do the hard work here and few other places :)
  18. end
  19. end
  20.  
  21. class NmapParser < ToolParser
  22. def execute(xml)
  23. # do the hard work here and few other places :)
  24. end
  25. end
Add Comment
Please, Sign In to add comment