Module: Votd
- Defined in:
- lib/votd.rb,
lib/votd/cli.rb,
lib/votd/base.rb,
lib/votd/version.rb,
lib/votd/esvbible.rb,
lib/votd/netbible.rb,
lib/votd/ourmanna.rb,
lib/votd/votd_error.rb,
lib/votd/fetch_error.rb,
lib/votd/helper/text.rb,
lib/votd/bible_gateway.rb,
lib/votd/helper/command_line.rb
Overview
This class acts as the entry point to all sub-modules that are used to interact with various Verse of the Day web services.
Defined Under Namespace
Modules: Helper Classes: Base, BibleGateway, CLI, ESVBible, FetchError, InvalidBibleVersion, NetBible, OurManna, VotdError
Constant Summary collapse
- VERSION =
Gem version number
"4.0.1"
Class Attribute Summary collapse
-
.logger ⇒ Object
Set a Logger-compatible object to receive error messages when a provider fails to fetch a verse.
Class Method Summary collapse
-
.on_error {|provider_class, error| ... } ⇒ void
Register a callback to be invoked when a provider error occurs.
-
.on_error_callback ⇒ Proc?
private
Returns the registered on_error callback, if any.
-
.reset_configuration ⇒ void
Resets logger and on_error callback.
Class Attribute Details
.logger ⇒ Object
Set a Logger-compatible object to receive error messages when a provider fails to fetch a verse.
16 17 18 |
# File 'lib/votd.rb', line 16 def logger @logger end |
Class Method Details
.on_error {|provider_class, error| ... } ⇒ void
This method returns an undefined value.
Register a callback to be invoked when a provider error occurs. The block receives the provider class and the wrapped FetchError.
30 31 32 |
# File 'lib/votd.rb', line 30 def on_error(&block) @on_error = block end |
.on_error_callback ⇒ Proc?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the registered on_error callback, if any.
37 38 39 |
# File 'lib/votd.rb', line 37 def on_error_callback @on_error end |
.reset_configuration ⇒ void
This method returns an undefined value.
Resets logger and on_error callback. Useful in tests.
43 44 45 46 |
# File 'lib/votd.rb', line 43 def reset_configuration @logger = nil @on_error = nil end |