Module: Asciidoctor::BeautifyUri::ProviderRegistry
- Defined in:
- lib/asciidoctor/beautify_uri/provider_registry.rb
Overview
A provider is any object responding to .key, .display_name, .matches?(path), .resolve(path, doc) and .render_html(data)/.render_pdf_block(parent, data, opts). Third parties register additional providers without touching this gem — see DESIGN-asciidoctor-beautify-uri.adoc, "Provider Architecture".
Class Method Summary collapse
Class Method Details
.all ⇒ Object
19 20 21 |
# File 'lib/asciidoctor/beautify_uri/provider_registry.rb', line 19 def all @providers.values end |
.find(key) ⇒ Object
15 16 17 |
# File 'lib/asciidoctor/beautify_uri/provider_registry.rb', line 15 def find(key) @providers[key.to_s] end |
.register(provider) ⇒ Object
11 12 13 |
# File 'lib/asciidoctor/beautify_uri/provider_registry.rb', line 11 def register(provider) @providers[provider.key.to_s] = provider end |