use attr_writer instead of error_mode= method

This commit is contained in:
Dillon Benson
2014-05-02 17:18:56 -04:00
parent 75068e8fa4
commit 6e40746ce4

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