Class: Awestruct::Handlers::TiltMatcher
- Inherits:
-
Object
- Object
- Awestruct::Handlers::TiltMatcher
- Defined in:
- lib/awestruct/handlers/base_tilt_handler.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#match(path) ⇒ Object
Returns the Tilt template class if a portion of the path is registered to a Tilt template and the Tilt template can be loaded.
Instance Method Details
#match(path) ⇒ Object
Returns the Tilt template class if a portion of the path is registered to a Tilt template and the Tilt template can be loaded. Returns false if no portions of the path are registered to a Tilt template or the Tilt template cannot be loaded.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/awestruct/handlers/base_tilt_handler.rb', line 14 def match(path) matcher = ::Tilt[File.basename(path)] if matcher.nil? $LOG.debug(%(Copying #{path})) if Awestruct::Engine.instance.config.verbose && Awestruct::Engine.instance.config.debug return false end # We have our own extra integration with Asciidoctor return false if matcher.name.include? 'Asciidoctor' matcher end |