Class: StackMaster::TemplateCompiler
- Inherits:
-
Object
- Object
- StackMaster::TemplateCompiler
- Defined in:
- lib/stack_master/template_compiler.rb
Constant Summary collapse
- TemplateCompilationFailed =
Class.new(RuntimeError)
Class Method Summary collapse
Class Method Details
.compile(config, template_file_path) ⇒ Object
5 6 7 8 9 |
# File 'lib/stack_master/template_compiler.rb', line 5 def self.compile(config, template_file_path) template_compiler_for_file(template_file_path, config).compile(template_file_path) rescue raise TemplateCompilationFailed.new("Failed to compile #{template_file_path}.") end |
.register(name, klass) ⇒ Object
11 12 13 14 |
# File 'lib/stack_master/template_compiler.rb', line 11 def self.register(name, klass) @compilers ||= {} @compilers[name] = klass end |