ramda.rb 672 B

123456789101112131415161718192021222324
  1. module Docs
  2. class Ramda < UrlScraper
  3. self.type = 'ramda'
  4. self.release = '0.27.0'
  5. self.base_url = "https://ramdajs.com/#{release}/docs/"
  6. self.links = {
  7. home: 'http://ramdajs.com/',
  8. code: 'https://github.com/ramda/ramda/'
  9. }
  10. html_filters.push 'ramda/entries', 'ramda/clean_html', 'title'
  11. options[:title] = 'Ramda'
  12. options[:attribution] = <<-HTML
  13. &copy; 2013&ndash;2020 Scott Sauyet and Michael Hurley<br>
  14. Licensed under the MIT License.
  15. HTML
  16. def get_latest_version(opts)
  17. doc = fetch_doc('https://ramdajs.com/docs/', opts)
  18. doc.at_css('.navbar-brand > .version').content[1..-1]
  19. end
  20. end
  21. end