Class: Awestruct::Handlers::NonInterpolatingTiltMatcher
- Inherits:
-
Object
- Object
- Awestruct::Handlers::NonInterpolatingTiltMatcher
- Defined in:
- lib/awestruct/handlers/tilt_handler.rb
Constant Summary collapse
- EXT_REGEX =
/\.(haml|slim|erb|mustache)$/
Instance Method Summary collapse
Instance Method Details
#match(path) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/awestruct/handlers/tilt_handler.rb', line 23 def match(path) if match = EXT_REGEX.match(path) if match[0] == '.slim' && Tilt[path].nil? require 'slim' end true else false end end |