From c08a358a2bcb7a5bff9873887c52a2443aae68e6 Mon Sep 17 00:00:00 2001 From: Celso Dantas Date: Thu, 12 Dec 2019 14:25:39 -0500 Subject: [PATCH] Use String literal instead of using a class method The class method string definition is not needed here, so it can be removed. --- lib/liquid/tags/assign.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/liquid/tags/assign.rb b/lib/liquid/tags/assign.rb index e10b729..3a3f683 100644 --- a/lib/liquid/tags/assign.rb +++ b/lib/liquid/tags/assign.rb @@ -12,10 +12,6 @@ module Liquid class Assign < Tag Syntax = /(#{VariableSignature}+)\s*=\s*(.*)\s*/om - def self.syntax_error_translation_key - "errors.syntax.assign" - end - attr_reader :to, :from def initialize(tag_name, markup, options) @@ -24,7 +20,7 @@ module Liquid @to = Regexp.last_match(1) @from = Variable.new(Regexp.last_match(2), options) else - raise SyntaxError, options[:locale].t(self.class.syntax_error_translation_key) + raise SyntaxError, options[:locale].t('errors.syntax.assign') end end