Class: PartialCompiler::Plugin
- Inherits:
-
Object
- Object
- PartialCompiler::Plugin
- Defined in:
- lib/partial_compiler/plugin.rb
Instance Method Summary collapse
-
#initialize ⇒ Plugin
constructor
A new instance of Plugin.
Constructor Details
#initialize ⇒ Plugin
Returns a new instance of Plugin.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/partial_compiler/plugin.rb', line 3 def initialize original_extension = PartialCompiler.config[:original_extension] template_engine = get_template_engine if !PartialCompiler.config[:run_compiled] ActionView::Template.register_template_handler( "uc.#{original_extension}".to_sym, "uncompiled.#{original_extension}".to_sym, template_engine.send(:new) ) else ActionView::Template.register_template_handler("compiled.#{original_extension}".to_sym, template_engine.send(:new)) end end |