مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-11-30 21:32:30 +00:00
style(rubocop): Style/PreferredHashMethods
هذا الالتزام موجود في:
@@ -20,13 +20,13 @@ module Postal
|
||||
end
|
||||
|
||||
def method_missing(name, value = nil, &block)
|
||||
return unless @attributes.has_key?(name.to_s)
|
||||
return unless @attributes.key?(name.to_s)
|
||||
|
||||
@attributes[name.to_s]
|
||||
end
|
||||
|
||||
def respond_to_missing?(name)
|
||||
@attributes.has_key?(name.to_s)
|
||||
@attributes.key?(name.to_s)
|
||||
end
|
||||
|
||||
def timestamp
|
||||
|
||||
@@ -178,7 +178,7 @@ module Postal
|
||||
# Provide access to set and get acceptable attributes
|
||||
#
|
||||
def method_missing(name, value = nil, &block)
|
||||
if @attributes.has_key?(name.to_s)
|
||||
if @attributes.key?(name.to_s)
|
||||
@attributes[name.to_s]
|
||||
elsif name.to_s =~ /=\z/
|
||||
@attributes[name.to_s.gsub("=", "").to_s] = value
|
||||
@@ -187,7 +187,7 @@ module Postal
|
||||
|
||||
def respond_to_missing?(name)
|
||||
name = name.to_s.sub(/=\z/, "")
|
||||
@attributes.has_key?(name.to_s)
|
||||
@attributes.key?(name.to_s)
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم