mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Merge pull request #354 from Dillon-Benson/patch-3
use attr_writer instead of error_mode= method
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user