1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00

style(rubocop): Style/PreferredHashMethods

هذا الالتزام موجود في:
Adam Cooke
2024-02-10 23:37:58 +00:00
الأصل ffcb707247
التزام 013b3ea931
2 ملفات معدلة مع 4 إضافات و4 حذوفات

عرض الملف

@@ -20,13 +20,13 @@ module Postal
end end
def method_missing(name, value = nil, &block) 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] @attributes[name.to_s]
end end
def respond_to_missing?(name) def respond_to_missing?(name)
@attributes.has_key?(name.to_s) @attributes.key?(name.to_s)
end end
def timestamp def timestamp

عرض الملف

@@ -178,7 +178,7 @@ module Postal
#  Provide access to set and get acceptable attributes #  Provide access to set and get acceptable attributes
# #
def method_missing(name, value = nil, &block) def method_missing(name, value = nil, &block)
if @attributes.has_key?(name.to_s) if @attributes.key?(name.to_s)
@attributes[name.to_s] @attributes[name.to_s]
elsif name.to_s =~ /=\z/ elsif name.to_s =~ /=\z/
@attributes[name.to_s.gsub("=", "").to_s] = value @attributes[name.to_s.gsub("=", "").to_s] = value
@@ -187,7 +187,7 @@ module Postal
def respond_to_missing?(name) def respond_to_missing?(name)
name = name.to_s.sub(/=\z/, "") name = name.to_s.sub(/=\z/, "")
@attributes.has_key?(name.to_s) @attributes.key?(name.to_s)
end end
# #