module Docs class Ember < UrlScraper include MultipleBaseUrls self.name = 'Ember.js' self.slug = 'ember' self.type = 'ember' self.release = '2.14.0' self.base_urls = [ 'https://guides.emberjs.com/v2.14.0/', 'https://emberjs.com/api/ember/2.14/', 'https://emberjs.com/api/ember-data/2.14/' ] self.links = { home: 'https://emberjs.com/', code: 'https://github.com/emberjs/ember.js' } html_filters.push 'ember/entries', 'ember/clean_html' options[:trailing_slash] = false options[:container] = ->(filter) do if filter.base_url.path.start_with?('/api') 'main article' else 'main' end end options[:fix_urls] = ->(url) do url.sub! '?anchor=', '#' url.sub! %r{/methods/[^?#/]+}, '/methods' url.sub! %r{/properties/[^?#/]+}, '/properties' url.sub! %r{/events/[^?#/]+}, '/events' url end options[:skip_patterns] = [ /\._/, /contributing/, /classes\/String/, /namespaces\/Ember/, /namespaces\/DS/ ] options[:attribution] = <<-HTML © 2017 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License. HTML def initial_urls %w( https://guides.emberjs.com/v2.14.0/ https://emberjs.com/api/ember/2.14/classes/Ember https://emberjs.com/api/ember-data/2.14/classes/DS ) end end end