1
0

underscore.rb 863 B

1234567891011121314151617181920212223242526272829
  1. module Docs
  2. class Underscore < UrlScraper
  3. self.name = 'Underscore.js'
  4. self.slug = 'underscore'
  5. self.type = 'underscore'
  6. self.release = '1.9.1'
  7. self.base_url = 'https://underscorejs.org'
  8. self.links = {
  9. home: 'https://underscorejs.org',
  10. code: 'https://github.com/jashkenas/underscore'
  11. }
  12. html_filters.push 'underscore/clean_html', 'underscore/entries', 'title'
  13. options[:title] = 'Underscore.js'
  14. options[:container] = '#documentation'
  15. options[:skip_links] = true
  16. options[:attribution] = <<-HTML
  17. &copy; 2009&ndash;2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters &amp; Editors<br>
  18. Licensed under the MIT License.
  19. HTML
  20. def get_latest_version(opts)
  21. doc = fetch_doc('https://underscorejs.org/', opts)
  22. doc.at_css('.version').content[1...-1]
  23. end
  24. end
  25. end