mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
29 lines
864 B
Ruby
29 lines
864 B
Ruby
module Docs
|
|
class Underscore < UrlScraper
|
|
self.name = 'Underscore.js'
|
|
self.slug = 'underscore'
|
|
self.type = 'underscore'
|
|
self.release = '1.13.1'
|
|
self.base_url = 'https://underscorejs.org'
|
|
self.links = {
|
|
home: 'https://underscorejs.org',
|
|
code: 'https://github.com/jashkenas/underscore'
|
|
}
|
|
|
|
html_filters.push 'underscore/clean_html', 'underscore/entries', 'title'
|
|
|
|
options[:title] = 'Underscore.js'
|
|
options[:container] = '#documentation'
|
|
options[:skip_links] = true
|
|
|
|
options[:attribution] = <<-HTML
|
|
© 2009–2021 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors<br>
|
|
Licensed under the MIT License.
|
|
HTML
|
|
|
|
def get_latest_version(opts)
|
|
doc = fetch_doc('https://underscorejs.org/', opts)
|
|
doc.at_css('.version').content[1...-1]
|
|
end
|
|
end
|
|
end
|