1
0

rethinkdb.rb 664 B

12345678910111213141516171819202122
  1. module Docs
  2. class Rethinkdb < UrlScraper
  3. self.name = 'RethinkDB'
  4. self.type = 'rethinkdb'
  5. self.version = '1.16.0'
  6. self.base_url = 'http://rethinkdb.com/api/javascript/'
  7. html_filters.push 'rethinkdb/entries', 'rethinkdb/clean_html'
  8. options[:trailing_slash] = false
  9. options[:container] = '.container .section'
  10. options[:fix_urls] = ->(url) do
  11. url.sub! %r{rethinkdb.com/api/(?!javascript|ruby|python)}, 'rethinkdb.com/api/javascript/'
  12. end
  13. options[:attribution] = <<-HTML
  14. &copy; RethinkDB contributors<br>
  15. Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
  16. HTML
  17. end
  18. end