-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathbackbone.rb
More file actions
33 lines (28 loc) · 878 Bytes
/
backbone.rb
File metadata and controls
33 lines (28 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
module Docs
class Backbone < UrlScraper
self.name = 'Backbone.js'
self.slug = 'backbone'
self.type = 'underscore'
self.release = '1.4.0'
self.base_url = 'https://backbonejs.org'
self.links = {
home: 'https://backbonejs.org/',
code: 'https://github.com/jashkenas/backbone'
}
html_filters.push 'backbone/clean_html', 'backbone/entries', 'title'
options[:title] = 'Backbone.js'
options[:container] = '.container'
options[:skip_links] = true
options[:attribution] = <<-HTML
© 2010–2019 Jeremy Ashkenas, DocumentCloud<br>
Licensed under the MIT License.
HTML
options[:external_urls] = {
'underscorejs.org' => 'underscore'
}
def get_latest_version(opts)
doc = fetch_doc('https://backbonejs.org/', opts)
doc.at_css('.version').content[1...-1]
end
end
end