Module: HamlLoader
- Defined in:
- lib/asker/loader/haml_loader.rb
Class Method Summary collapse
Class Method Details
.load(filename) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/asker/loader/haml_loader.rb', line 5 def self.load(filename) template = File.read(filename) begin # INFO <haml 5.1> 20221223 haml_engine = Haml::Engine.new(template) # INFO <haml 6.1> 20221226 # return Haml::Template.new { template }.render rescue => e Logger.error "HamlLoader: Can't load file (#{filename})" Logger.error " : #{e}" exit 1 end haml_engine.render end |