Class: Temple::Generator
- Inherits:
-
Object
- Object
- Temple::Generator
- Defined in:
- lib/asciidoctor/templates_compiler/temple_ext.rb
Overview
Monkey-patch Temple::Generator to fix bugs/inconviences waiting to be merged into upstream.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Generator
constructor
XXX: Remove after github.com/judofyr/temple/pull/113 is merged.
-
#on_capture(name, exp) ⇒ Object
XXX: Remove after github.com/judofyr/temple/pull/112 is merged.
Constructor Details
#initialize(opts = {}) ⇒ Generator
XXX: Remove after github.com/judofyr/temple/pull/113 is merged.
10 11 12 13 |
# File 'lib/asciidoctor/templates_compiler/temple_ext.rb', line 10 def initialize(opts = {}) self.class.[:capture_generator] = self.class super end |
Instance Method Details
#on_capture(name, exp) ⇒ Object
XXX: Remove after github.com/judofyr/temple/pull/112 is merged.
16 17 18 |
# File 'lib/asciidoctor/templates_compiler/temple_ext.rb', line 16 def on_capture(name, exp) capture_generator.new(**, buffer: name).call(exp) end |