Merge pull request #354 from Dillon-Benson/patch-3

use attr_writer instead of error_mode= method
This commit is contained in:
Florian Weingarten
2014-05-02 18:15:33 -04:00

View File

@@ -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