mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
use attr_writer instead of error_mode= method
This commit is contained in:
@@ -22,6 +22,12 @@ module Liquid
|
|||||||
@@file_system = BlankFileSystem.new
|
@@file_system = BlankFileSystem.new
|
||||||
|
|
||||||
class << self
|
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
|
def file_system
|
||||||
@@file_system
|
@@file_system
|
||||||
end
|
end
|
||||||
@@ -38,14 +44,6 @@ module Liquid
|
|||||||
@tags ||= {}
|
@tags ||= {}
|
||||||
end
|
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
|
def error_mode
|
||||||
@error_mode || :lax
|
@error_mode || :lax
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user