lib/deas-nm.rb in deas-nm-0.1.0 vs lib/deas-nm.rb in deas-nm-0.2.0
- old
+ new
@@ -5,17 +5,24 @@
module Deas::Nm
class TemplateEngine < Deas::TemplateEngine
DEFAULT_HANDLER_LOCAL = 'view'.freeze
+ DEFAULT_LOGGER_LOCAL = 'logger'.freeze
DEFAULT_SERIALIZER = proc{ |obj, template_name| obj }.freeze # no-op
def nm_source
- @nm_source ||= Nm::Source.new(self.source_path)
+ @nm_source ||= Nm::Source.new(self.source_path, {
+ self.nm_logger_local => self.logger
+ })
end
def nm_handler_local
@nm_handler_local ||= (self.opts['handler_local'] || DEFAULT_HANDLER_LOCAL)
+ end
+
+ def nm_logger_local
+ @nm_logger_local ||= (self.opts['logger_local'] || DEFAULT_LOGGER_LOCAL)
end
def nm_serializer
@nm_serializer ||= (self.opts['serializer'] || DEFAULT_SERIALIZER)
end