style(rubocop): Naming/MemoizedInstanceVariableName

This commit is contained in:
Adam Cooke
2024-02-12 09:40:34 +00:00
parent 00a02f2655
commit 9563f30c96
6 changed files with 26 additions and 26 deletions
+3 -3
View File
@@ -8,12 +8,12 @@ module Postal
end
def [](value)
to_hash[value.to_s]
hash[value.to_s]
end
delegate :empty?, to: :to_hash
delegate :empty?, to: :hash
def to_hash
def hash
@hash ||= @string.scan(/([a-z]+):\s*(?:(\d{2,4}-\d{2}-\d{2}\s\d{2}:\d{2})|"(.*?)"|(.*?))(\s|\z)/).each_with_object({}) do |(key, date, string_with_spaces, value), hash|
if date
actual_value = date
+1 -1
View File
@@ -202,7 +202,7 @@ module Postal
end
def job_channel
@channel ||= Postal::RabbitMQ.create_channel
@job_channel ||= Postal::RabbitMQ.create_channel
end
def job_queue(name)