Class: Asciidoctor::Converter::CustomFactory
- Inherits:
-
Object
- Object
- Asciidoctor::Converter::CustomFactory
- Includes:
- Factory
- Defined in:
- lib/asciidoctor/converter.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(seed_registry = nil) ⇒ CustomFactory
constructor
A new instance of CustomFactory.
-
#unregister_all ⇒ void
Unregister all Converter classes that are registered with this factory.
Methods included from Factory
#converters, #create, create, default, #for, new, #register
Constructor Details
#initialize(seed_registry = nil) ⇒ CustomFactory
Returns a new instance of CustomFactory.
260 261 262 263 264 265 266 267 |
# File 'lib/asciidoctor/converter.rb', line 260 def initialize seed_registry = nil if seed_registry seed_registry.default = seed_registry.delete '*' @registry = seed_registry else @registry = {} end end |
Instance Method Details
#unregister_all ⇒ void
This method returns an undefined value.
Unregister all Converter classes that are registered with this factory. Intended for testing only.
272 273 274 |
# File 'lib/asciidoctor/converter.rb', line 272 def unregister_all registry.clear.default = nil end |