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.
259 260 261 262 263 264 265 266 |
# File 'lib/asciidoctor/converter.rb', line 259 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.
271 272 273 |
# File 'lib/asciidoctor/converter.rb', line 271 def unregister_all registry.clear.default = nil end |