1
0

redis.rb 708 B

1234567891011121314151617181920212223
  1. module Docs
  2. class Redis < UrlScraper
  3. self.type = 'redis'
  4. self.release = '4.0.6'
  5. self.base_url = 'https://redis.io/commands'
  6. self.links = {
  7. home: 'https://redis.io/',
  8. code: 'https://github.com/antirez/redis'
  9. }
  10. html_filters.push 'redis/entries', 'redis/clean_html', 'title'
  11. options[:container] = ->(filter) { filter.root_page? ? '#commands' : '.text' }
  12. options[:title] = false
  13. options[:root_title] = 'Redis'
  14. options[:follow_links] = ->(filter) { filter.root_page? }
  15. options[:attribution] = <<-HTML
  16. &copy; 2009&ndash;2017 Salvatore Sanfilippo<br>
  17. Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
  18. HTML
  19. end
  20. end