lib/inky/rails/template_handler.rb in inky-rb-1.3.6.1 vs lib/inky/rails/template_handler.rb in inky-rb-1.3.6.2

- old
+ new

@@ -1,14 +1,16 @@ module Inky module Rails class TemplateHandler - def self.erb_handler - @@erb_handler ||= ActionView::Template.registered_template_handler(:erb) - end + class << self + def erb_handler + @erb_handler ||= ActionView::Template.registered_template_handler(:erb) + end - def self.call(template) - compiled_source = erb_handler.call(template) - "Inky::Core.new.release_the_kraken(begin; #{compiled_source};end)" + def call(template) + compiled_source = erb_handler.call(template) + "Inky::Core.new.release_the_kraken(begin; #{compiled_source};end)" + end end end end end