lib/rubycritic/report_generators/line_generator.rb in rubycritic-0.0.9 vs lib/rubycritic/report_generators/line_generator.rb in rubycritic-0.0.10
- old
+ new
@@ -3,11 +3,11 @@
require "cgi"
module Rubycritic
class LineGenerator < BaseGenerator
- NORMAL_TEMPLATE = ERB.new(File.read(File.join(TEMPLATES_DIR, "line.html.erb")))
- SMELLY_TEMPLATE = ERB.new(File.read(File.join(TEMPLATES_DIR, "smelly_line.html.erb")))
+ NORMAL_TEMPLATE = erb_template("line.html.erb")
+ SMELLY_TEMPLATE = erb_template("smelly_line.html.erb")
def initialize(text, smells)
@text = CGI::escapeHTML(text.chomp)
@smells = smells
@template =