From 6e40746ce423ed7ddfdb628607722be7eaa57723 Mon Sep 17 00:00:00 2001 From: Dillon Benson Date: Fri, 2 May 2014 17:18:56 -0400 Subject: [PATCH] use attr_writer instead of error_mode= method --- lib/liquid/template.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/liquid/template.rb b/lib/liquid/template.rb index d9c409b..1e20b84 100644 --- a/lib/liquid/template.rb +++ b/lib/liquid/template.rb @@ -22,6 +22,12 @@ module Liquid @@file_system = BlankFileSystem.new class << self + # Sets how strict the parser should be. + # :lax acts like liquid 2.5 and silently ignores malformed tags in most cases. + # :warn is the default and will give deprecation warnings when invalid syntax is used. + # :strict will enforce correct syntax. + attr_writer :error_mode + def file_system @@file_system end @@ -38,14 +44,6 @@ module Liquid @tags ||= {} end - # Sets how strict the parser should be. - # :lax acts like liquid 2.5 and silently ignores malformed tags in most cases. - # :warn is the default and will give deprecation warnings when invalid syntax is used. - # :strict will enforce correct syntax. - def error_mode=(mode) - @error_mode = mode - end - def error_mode @error_mode || :lax end