Module: Wgit
- Defined in:
- lib/wgit/version.rb,
lib/wgit/dsl.rb,
lib/wgit/url.rb,
lib/wgit/base.rb,
lib/wgit/model.rb,
lib/wgit/utils.rb,
lib/wgit/logger.rb,
lib/wgit/crawler.rb,
lib/wgit/indexer.rb,
lib/wgit/document.rb,
lib/wgit/response.rb,
lib/wgit/assertable.rb,
lib/wgit/html_to_text.rb,
lib/wgit/robots_parser.rb,
lib/wgit/database/database.rb
Overview
Wgit is a WWW indexer/scraper which crawls URL's and retrieves their page contents for later use.
Defined Under Namespace
Modules: Assertable, DSL, Database, Model, Utils Classes: Base, Crawler, Document, HTMLToText, Indexer, Response, RobotsParser, Url
Constant Summary collapse
- VERSION =
The current gem version of Wgit.
"0.12.0"
Class Method Summary collapse
-
.default_logger ⇒ Logger
Returns the default Logger instance.
-
.logger ⇒ Logger
Returns the current Logger instance.
-
.logger=(logger) ⇒ Logger
Sets the current Logger instance.
-
.use_default_logger ⇒ Logger
Sets the default Logger instance to be used by Wgit.
-
.version ⇒ Object
Returns the current gem version of Wgit as a String.
-
.version_str ⇒ Object
Returns the current gem version in a presentation String.
Class Method Details
.default_logger ⇒ Logger
Returns the default Logger instance.
30 31 32 33 34 35 36 |
# File 'lib/wgit/logger.rb', line 30 def self.default_logger logger = Logger.new($stdout, progname: "wgit", level: :info) logger.formatter = proc do |_severity, _datetime, progname, msg| "[#{progname}] #{msg}\n" end logger end |
.logger ⇒ Logger
Returns the current Logger instance.
15 16 17 |
# File 'lib/wgit/logger.rb', line 15 def self.logger @logger end |
.logger=(logger) ⇒ Logger
Sets the current Logger instance.
23 24 25 |
# File 'lib/wgit/logger.rb', line 23 def self.logger=(logger) @logger = logger end |
.use_default_logger ⇒ Logger
Sets the default Logger instance to be used by Wgit.
41 42 43 |
# File 'lib/wgit/logger.rb', line 41 def self.use_default_logger @logger = default_logger end |
.version ⇒ Object
Returns the current gem version of Wgit as a String.
12 13 14 |
# File 'lib/wgit/version.rb', line 12 def self.version VERSION end |
.version_str ⇒ Object
Returns the current gem version in a presentation String.
17 18 19 |
# File 'lib/wgit/version.rb', line 17 def self.version_str "wgit v#{VERSION}" end |