Module: Docs

Extended by:
AutoloadHelper, Instrumentable
Defined in:
lib/docs.rb,
lib/docs/core/url.rb,
lib/docs/core/doc.rb,
lib/docs/scrapers/c.rb,
lib/docs/scrapers/go.rb,
lib/docs/core/filter.rb,
lib/docs/scrapers/d3.rb,
lib/docs/core/parser.rb,
lib/docs/core/request.rb,
lib/docs/core/scraper.rb,
lib/docs/scrapers/yii.rb,
lib/docs/scrapers/git.rb,
lib/docs/scrapers/cpp.rb,
lib/docs/scrapers/lua.rb,
lib/docs/core/page_db.rb,
lib/docs/scrapers/php.rb,
lib/docs/scrapers/yii1.rb,
lib/docs/core/response.rb,
lib/docs/core/manifest.rb,
lib/docs/scrapers/http.rb,
lib/docs/scrapers/less.rb,
lib/docs/scrapers/sass.rb,
lib/docs/scrapers/node.rb,
lib/docs/scrapers/iojs.rb,
lib/docs/scrapers/chai.rb,
lib/docs/scrapers/sinon.rb,
lib/docs/scrapers/ember.rb,
lib/docs/scrapers/redis.rb,
lib/docs/core/requester.rb,
lib/docs/scrapers/grunt.rb,
lib/docs/scrapers/bower.rb,
lib/docs/scrapers/nginx.rb,
lib/docs/scrapers/react.rb,
lib/docs/core/subscriber.rb,
lib/docs/scrapers/django.rb,
lib/docs/scrapers/moment.rb,
lib/docs/scrapers/maxcdn.rb,
lib/docs/scrapers/python.rb,
lib/docs/scrapers/lodash.rb,
lib/docs/scrapers/cordova.rb,
lib/docs/scrapers/laravel.rb,
lib/docs/scrapers/phpunit.rb,
lib/docs/scrapers/angular.rb,
lib/docs/core/entry_index.rb,
lib/docs/core/models/type.rb,
lib/docs/scrapers/mdn/mdn.rb,
lib/docs/scrapers/mdn/svg.rb,
lib/docs/scrapers/express.rb,
lib/docs/scrapers/clojure.rb,
lib/docs/scrapers/python2.rb,
lib/docs/scrapers/mdn/dom.rb,
lib/docs/scrapers/mdn/css.rb,
lib/docs/scrapers/symfony.rb,
lib/docs/scrapers/haskell.rb,
lib/docs/scrapers/socketio.rb,
lib/docs/scrapers/knockout.rb,
lib/docs/scrapers/backbone.rb,
lib/docs/scrapers/mongoose.rb,
lib/docs/scrapers/markdown.rb,
lib/docs/core/filter_stack.rb,
lib/docs/filters/c/entries.rb,
lib/docs/scrapers/mdn/html.rb,
lib/docs/core/models/entry.rb,
lib/docs/storage/null_store.rb,
lib/docs/scrapers/rdoc/ruby.rb,
lib/docs/scrapers/rdoc/rdoc.rb,
lib/docs/filters/c/fix_code.rb,
lib/docs/scrapers/mdn/xpath.rb,
lib/docs/storage/file_store.rb,
lib/docs/filters/d3/entries.rb,
lib/docs/filters/go/entries.rb,
lib/docs/filters/core/title.rb,
lib/docs/scrapers/rethinkdb.rb,
lib/docs/scrapers/modernizr.rb,
lib/docs/scrapers/nokogiri2.rb,
lib/docs/scrapers/requirejs.rb,
lib/docs/filters/c/fix_urls.rb,
lib/docs/scrapers/rdoc/rails.rb,
lib/docs/filters/dom/entries.rb,
lib/docs/filters/css/entries.rb,
lib/docs/scrapers/marionette.rb,
lib/docs/filters/svg/entries.rb,
lib/docs/filters/cpp/entries.rb,
lib/docs/filters/lua/entries.rb,
lib/docs/scrapers/postgresql.rb,
lib/docs/scrapers/underscore.rb,
lib/docs/core/instrumentable.rb,
lib/docs/filters/yii/entries.rb,
lib/docs/filters/php/entries.rb,
lib/docs/filters/git/entries.rb,
lib/docs/filters/php/fix_urls.rb,
lib/docs/core/autoload_helper.rb,
lib/docs/filters/ruby/entries.rb,
lib/docs/filters/core/entries.rb,
lib/docs/filters/less/entries.rb,
lib/docs/filters/http/entries.rb,
lib/docs/filters/html/entries.rb,
lib/docs/filters/sass/entries.rb,
lib/docs/filters/rdoc/entries.rb,
lib/docs/filters/c/clean_html.rb,
lib/docs/filters/node/entries.rb,
lib/docs/filters/cpp/fix_urls.rb,
lib/docs/filters/yii1/entries.rb,
lib/docs/filters/chai/entries.rb,
lib/docs/filters/sinon/entries.rb,
lib/docs/filters/rails/entries.rb,
lib/docs/filters/ember/entries.rb,
lib/docs/filters/nginx/entries.rb,
lib/docs/filters/go/clean_html.rb,
lib/docs/scrapers/coffeescript.rb,
lib/docs/filters/redis/entries.rb,
lib/docs/filters/xpath/entries.rb,
lib/docs/filters/grunt/entries.rb,
lib/docs/filters/d3/clean_html.rb,
lib/docs/filters/react/entries.rb,
lib/docs/filters/bower/entries.rb,
lib/docs/filters/moment/entries.rb,
lib/docs/filters/django/entries.rb,
lib/docs/filters/python/entries.rb,
lib/docs/filters/git/clean_html.rb,
lib/docs/filters/yii/clean_html.rb,
lib/docs/filters/lodash/entries.rb,
lib/docs/filters/lua/clean_html.rb,
lib/docs/storage/abstract_store.rb,
lib/docs/filters/php/clean_html.rb,
lib/docs/filters/rdoc/container.rb,
lib/docs/scrapers/jquery/jquery.rb,
lib/docs/filters/mdn/clean_html.rb,
lib/docs/filters/svg/clean_html.rb,
lib/docs/filters/maxcdn/entries.rb,
lib/docs/filters/core/container.rb,
lib/docs/filters/dom/clean_html.rb,
lib/docs/filters/css/clean_html.rb,
lib/docs/filters/node/clean_html.rb,
lib/docs/filters/python2/entries.rb,
lib/docs/filters/core/clean_text.rb,
lib/docs/filters/angular/entries.rb,
lib/docs/filters/core/clean_html.rb,
lib/docs/filters/core/inner_html.rb,
lib/docs/filters/less/clean_html.rb,
lib/docs/filters/yii1/clean_html.rb,
lib/docs/filters/express/entries.rb,
lib/docs/filters/haskell/entries.rb,
lib/docs/filters/cordova/entries.rb,
lib/docs/filters/http/clean_html.rb,
lib/docs/scrapers/mdn/dom_events.rb,
lib/docs/scrapers/mdn/javascript.rb,
lib/docs/filters/django/fix_urls.rb,
lib/docs/filters/clojure/entries.rb,
lib/docs/filters/sass/clean_html.rb,
lib/docs/filters/phpunit/entries.rb,
lib/docs/filters/symfony/entries.rb,
lib/docs/filters/laravel/entries.rb,
lib/docs/filters/chai/clean_html.rb,
lib/docs/filters/html/clean_html.rb,
lib/docs/filters/rdoc/clean_html.rb,
lib/docs/filters/ember/clean_html.rb,
lib/docs/filters/core/attribution.rb,
lib/docs/filters/socketio/entries.rb,
lib/docs/filters/mongoose/entries.rb,
lib/docs/filters/nginx/clean_html.rb,
lib/docs/filters/markdown/entries.rb,
lib/docs/filters/knockout/entries.rb,
lib/docs/filters/sinon/clean_html.rb,
lib/docs/filters/backbone/entries.rb,
lib/docs/filters/redis/clean_html.rb,
lib/docs/filters/react/clean_html.rb,
lib/docs/filters/xpath/clean_html.rb,
lib/docs/filters/grunt/clean_html.rb,
lib/docs/filters/bower/clean_html.rb,
lib/docs/filters/maxcdn/clean_html.rb,
lib/docs/filters/requirejs/entries.rb,
lib/docs/scrapers/jquery/jquery_ui.rb,
lib/docs/filters/php/internal_urls.rb,
lib/docs/filters/jquery/clean_html.rb,
lib/docs/filters/django/clean_html.rb,
lib/docs/filters/jquery_ui/entries.rb,
lib/docs/filters/jquery/clean_urls.rb,
lib/docs/filters/moment/clean_html.rb,
lib/docs/filters/nokogiri2/entries.rb,
lib/docs/filters/python/clean_html.rb,
lib/docs/core/scrapers/url_scraper.rb,
lib/docs/filters/modernizr/entries.rb,
lib/docs/filters/lodash/clean_html.rb,
lib/docs/filters/rethinkdb/entries.rb,
lib/docs/filters/marionette/entries.rb,
lib/docs/filters/laravel/clean_html.rb,
lib/docs/filters/express/clean_html.rb,
lib/docs/filters/haskell/clean_html.rb,
lib/docs/filters/cordova/clean_html.rb,
lib/docs/filters/core/internal_urls.rb,
lib/docs/filters/dom_events/entries.rb,
lib/docs/core/scrapers/file_scraper.rb,
lib/docs/filters/javascript/entries.rb,
lib/docs/filters/phpunit/clean_html.rb,
lib/docs/filters/angular/clean_html.rb,
lib/docs/filters/symfony/clean_html.rb,
lib/docs/filters/clojure/clean_html.rb,
lib/docs/filters/underscore/entries.rb,
lib/docs/filters/postgresql/entries.rb,
lib/docs/filters/angular/clean_urls.rb,
lib/docs/filters/markdown/clean_html.rb,
lib/docs/filters/knockout/clean_html.rb,
lib/docs/filters/socketio/clean_html.rb,
lib/docs/filters/mongoose/clean_html.rb,
lib/docs/filters/core/normalize_urls.rb,
lib/docs/filters/mdn/contribute_link.rb,
lib/docs/filters/jquery_core/entries.rb,
lib/docs/scrapers/jquery/jquery_core.rb,
lib/docs/filters/backbone/clean_html.rb,
lib/docs/filters/core/normalize_paths.rb,
lib/docs/filters/requirejs/clean_html.rb,
lib/docs/filters/modernizr/clean_html.rb,
lib/docs/subscribers/store_subscriber.rb,
lib/docs/filters/coffeescript/entries.rb,
lib/docs/filters/rethinkdb/clean_html.rb,
lib/docs/filters/dom_events/clean_html.rb,
lib/docs/filters/marionette/clean_html.rb,
lib/docs/filters/core/clean_local_urls.rb,
lib/docs/subscribers/filter_subscriber.rb,
lib/docs/filters/javascript/clean_html.rb,
lib/docs/filters/postgresql/clean_html.rb,
lib/docs/filters/underscore/clean_html.rb,
lib/docs/scrapers/jquery/jquery_mobile.rb,
lib/docs/filters/jquery_mobile/entries.rb,
lib/docs/subscribers/scraper_subscriber.rb,
lib/docs/subscribers/request_subscriber.rb,
lib/docs/filters/coffeescript/clean_html.rb,
lib/docs/filters/postgresql/extract_metadata.rb,
lib/docs/subscribers/progress_bar_subscriber.rb

Defined Under Namespace

Modules: AutoloadHelper, Instrumentable, Response Classes: AbstractStore, Angular, AttributionFilter, Backbone, Bower, C, Chai, CleanHtmlFilter, CleanLocalUrlsFilter, CleanTextFilter, Clojure, Coffeescript, ContainerFilter, Cordova, Cpp, Css, D3, Django, Doc, DocNotFound, Dom, DomEvents, Ember, EntriesFilter, Entry, EntryIndex, Express, FileScraper, FileStore, Filter, FilterStack, FilterSubscriber, Git, Go, Grunt, Haskell, Html, Http, InnerHtmlFilter, InternalUrlsFilter, Iojs, Javascript, Jquery, JqueryCore, JqueryMobile, JqueryUi, Knockout, Laravel, Less, Lodash, Lua, Manifest, Marionette, Markdown, Maxcdn, Mdn, Modernizr, Moment, Mongoose, Nginx, Node, Nokogiri2, NormalizePathsFilter, NormalizeUrlsFilter, NullStore, PageDb, Parser, Php, Phpunit, Postgresql, ProgressBarSubscriber, Python, Python2, Rails, Rdoc, React, Redis, Request, RequestSubscriber, Requester, Requirejs, Rethinkdb, Ruby, Sass, Scraper, ScraperSubscriber, Sinon, Socketio, StoreSubscriber, Subscriber, Svg, Symfony, TitleFilter, Type, URL, Underscore, UrlScraper, Xpath, Yii, Yii1

Constant Summary collapse

@@root_path =
File.expand_path '..', __FILE__

Class Method Summary collapse

Methods included from Instrumentable

extended, included

Methods included from AutoloadHelper

autoload_all

Class Method Details

.allObject


30
31
32
33
34
35
36
# File 'lib/docs.rb', line 30

def self.all
  Dir["#{root_path}/docs/scrapers/**/*.rb"].
    map { |file| File.basename(file, '.rb') }.
    sort!.
    map(&method(:find)).
    reject(&:abstract)
end

.find(name) ⇒ Object


38
39
40
41
42
43
44
45
46
47
# File 'lib/docs.rb', line 38

def self.find(name)
  const = name.camelize
  const_get(const)
rescue NameError => error
  if error.name.to_s == const
    raise DocNotFound.new("failed to locate doc class '#{name}'", name)
  else
    raise error
  end
end

.generate(name) ⇒ Object


53
54
55
# File 'lib/docs.rb', line 53

def self.generate(name)
  find(name).store_pages(store)
end

.generate_manifestObject


57
58
59
# File 'lib/docs.rb', line 57

def self.generate_manifest
  Manifest.new(store, all).store
end

.generate_page(name, page_id) ⇒ Object


49
50
51
# File 'lib/docs.rb', line 49

def self.generate_page(name, page_id)
  find(name).store_page(store, page_id)
end

.install_report(*names) ⇒ Object


67
68
69
70
71
# File 'lib/docs.rb', line 67

def self.install_report(*names)
  names.each do |name|
    const_get("#{name}_subscriber".camelize).subscribe_to(self)
  end
end

.storeObject


61
62
63
# File 'lib/docs.rb', line 61

def self.store
  store_class.new(store_path)
end